From 6f23241ba9d7d908534dade0e03041486a970ddc Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 2 Mar 2013 21:19:07 +0300 Subject: Other fixes after Coverity checks. --- src/being.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/being.cpp') 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) -- cgit v1.2.3-70-g09d2