summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-03-02 21:19:07 +0300
committerAndrei Karas <akaras@inbox.ru>2013-03-02 21:19:07 +0300
commit6f23241ba9d7d908534dade0e03041486a970ddc (patch)
tree69d25d1d9f7d6f78d80da60edd4a48f7c8dc85a2 /src/being.cpp
parentbfa44d6b007ca2e3ffabafda5beadbf102a6efdc (diff)
downloadManaVerse-6f23241ba9d7d908534dade0e03041486a970ddc.tar.gz
ManaVerse-6f23241ba9d7d908534dade0e03041486a970ddc.tar.bz2
ManaVerse-6f23241ba9d7d908534dade0e03041486a970ddc.tar.xz
ManaVerse-6f23241ba9d7d908534dade0e03041486a970ddc.zip
Other fixes after Coverity checks.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp9
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)