summaryrefslogtreecommitdiff
path: root/src/monster.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/monster.cpp')
-rw-r--r--src/monster.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/monster.cpp b/src/monster.cpp
index 9cbd28eb..ae749017 100644
--- a/src/monster.cpp
+++ b/src/monster.cpp
@@ -35,8 +35,12 @@
Monster::Monster(Uint16 id, Uint16 job, Map *map):
Being(id, job, map)
{
- mSprites[BASE_SPRITE] = AnimatedSprite::load(
- "graphics/sprites/" + getInfo().getSprite());
+ std::string filename = getInfo().getSprite();
+ if (filename.empty())
+ filename = "error.xml";
+
+ mSprites[BASE_SPRITE] =
+ AnimatedSprite::load("graphics/sprites/" + filename);
}
Being::Type