diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-03-02 21:19:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-03-02 21:19:07 +0300 |
commit | 6f23241ba9d7d908534dade0e03041486a970ddc (patch) | |
tree | 69d25d1d9f7d6f78d80da60edd4a48f7c8dc85a2 /src/being.cpp | |
parent | bfa44d6b007ca2e3ffabafda5beadbf102a6efdc (diff) | |
download | manaplus-6f23241ba9d7d908534dade0e03041486a970ddc.tar.gz manaplus-6f23241ba9d7d908534dade0e03041486a970ddc.tar.bz2 manaplus-6f23241ba9d7d908534dade0e03041486a970ddc.tar.xz manaplus-6f23241ba9d7d908534dade0e03041486a970ddc.zip |
Other fixes after Coverity checks.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/being.cpp b/src/being.cpp index 5448be58a..7b494b4a7 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -1156,9 +1156,11 @@ void Being::setAction(const Action &action, const int attackId) case DEAD: currentAction = SpriteAction::DEAD; if (mInfo) + { sound.playSfx(mInfo->getSound(SOUND_EVENT_DIE), mX, mY); - if (mType == MONSTER || mType == NPC) - mYDiff = mInfo->getDeadSortOffsetY(); + if (mType == MONSTER || mType == NPC) + mYDiff = mInfo->getDeadSortOffsetY(); + } break; case STAND: currentAction = SpriteAction::STAND; @@ -2183,9 +2185,6 @@ void Being::drawHpBar(Graphics *const graphics, const int maxHP, const int hp, if (maxHP <= 0 || !userPalette) return; - if (!hp && maxHP < hp) - return; - float p; if (hp) |