summaryrefslogtreecommitdiff
path: root/src
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 /src
parenteebadc5b3970ae11a1e51a5d1ceb8ec1b9fd0770 (diff)
downloadplus-327c7e01b95263961d1e3ecd450939de01262346.tar.gz
plus-327c7e01b95263961d1e3ecd450939de01262346.tar.bz2
plus-327c7e01b95263961d1e3ecd450939de01262346.tar.xz
plus-327c7e01b95263961d1e3ecd450939de01262346.zip
Change player action from sit to stand if player under attack.
Diffstat (limited to 'src')
-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);