summaryrefslogtreecommitdiff
path: root/src/monster.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-03 13:32:07 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-12-03 13:32:07 +0000
commit092bf185fc056338bcde2749a304e576edf342fd (patch)
tree7f5c6424998ba44f8732ec12d07f315297d8e49f /src/monster.cpp
parent100d02440e6715b7e02867b84fed759ed4258c73 (diff)
downloadmana-092bf185fc056338bcde2749a304e576edf342fd.tar.gz
mana-092bf185fc056338bcde2749a304e576edf342fd.tar.bz2
mana-092bf185fc056338bcde2749a304e576edf342fd.tar.xz
mana-092bf185fc056338bcde2749a304e576edf342fd.zip
Don't try to play empty strings as sounds, and don't return a SoundEffect
instance when Mix_Chunk loading failed.
Diffstat (limited to 'src/monster.cpp')
-rw-r--r--src/monster.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/monster.cpp b/src/monster.cpp
index f624ff07..68e9d6ba 100644
--- a/src/monster.cpp
+++ b/src/monster.cpp
@@ -73,11 +73,11 @@ Monster::setAction(Uint8 action)
break;
case DEAD:
currentAction = ACTION_DEAD;
- sound.playSfx(MonsterDB::get(mJob-1002).getSound(EVENT_DIE).c_str());
+ sound.playSfx(MonsterDB::get(mJob - 1002).getSound(EVENT_DIE));
break;
case ATTACK:
currentAction = ACTION_ATTACK;
- sound.playSfx(MonsterDB::get(mJob-1002).getSound(EVENT_HIT).c_str());
+ sound.playSfx(MonsterDB::get(mJob - 1002).getSound(EVENT_HIT));
mSprites[BASE_SPRITE]->reset();
break;
case STAND: