diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-09-08 01:33:59 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-09-08 01:33:59 +0300 |
commit | 327c7e01b95263961d1e3ecd450939de01262346 (patch) | |
tree | 0c84fed0c88249b5df6c7f8467d1e9ee8b61121a | |
parent | eebadc5b3970ae11a1e51a5d1ceb8ec1b9fd0770 (diff) | |
download | manaverse-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.cpp | 2 |
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); |