summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-09-08 01:33:59 +0300
committerAndrei Karas <akaras@inbox.ru>2011-09-08 01:33:59 +0300
commit327c7e01b95263961d1e3ecd450939de01262346 (patch)
tree0c84fed0c88249b5df6c7f8467d1e9ee8b61121a
parenteebadc5b3970ae11a1e51a5d1ceb8ec1b9fd0770 (diff)
downloadManaVerse-327c7e01b95263961d1e3ecd450939de01262346.tar.gz
ManaVerse-327c7e01b95263961d1e3ecd450939de01262346.tar.bz2
ManaVerse-327c7e01b95263961d1e3ecd450939de01262346.tar.xz
ManaVerse-327c7e01b95263961d1e3ecd450939de01262346.zip
Change player action from sit to stand if player under attack.
-rw-r--r--src/being.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 3d89c71ba..eafc647fc 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -717,6 +717,8 @@ void Being::handleAttack(Being *victim, int damage,
if (dir)
setDirection(dir);
}
+ if (victim->mType == PLAYER && victim->mAction == SIT)
+ victim->setAction(STAND);
sound.playSfx(mInfo->getSound((damage > 0) ?
SOUND_EVENT_HIT : SOUND_EVENT_MISS), mX, mY);