diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-19 02:45:52 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-19 02:45:52 +0200 |
commit | 1ea14cd03b6172681a3dff0b31d4088af3b1b5eb (patch) | |
tree | 0e168b993029c84db6c57a1cc39a4f9cf2661cb1 | |
parent | 3bf63452bfc54cd56395477eb0cb45cb18af6c09 (diff) | |
download | manaverse-1ea14cd03b6172681a3dff0b31d4088af3b1b5eb.tar.gz manaverse-1ea14cd03b6172681a3dff0b31d4088af3b1b5eb.tar.bz2 manaverse-1ea14cd03b6172681a3dff0b31d4088af3b1b5eb.tar.xz manaverse-1ea14cd03b6172681a3dff0b31d4088af3b1b5eb.zip |
Fix self rotation while attacking.
-rw-r--r-- | src/being.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp index 5ea0fca29..2f911b1ff 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -633,9 +633,12 @@ void Being::handleAttack(Being *victim, int damage, mActionTime = tick_time; } - Uint8 dir = calcDirection(victim->getTileX(), victim->getTileY()); - if (dir) - setDirection(dir); + if (this != player_node) + { + Uint8 dir = calcDirection(victim->getTileX(), victim->getTileY()); + if (dir) + setDirection(dir); + } sound.playSfx(mInfo->getSound((damage > 0) ? SOUND_EVENT_HIT : SOUND_EVENT_MISS), mX, mY); |