From 1ea14cd03b6172681a3dff0b31d4088af3b1b5eb Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 19 Mar 2011 02:45:52 +0200 Subject: Fix self rotation while attacking. --- src/being.cpp | 9 ++++++--- 1 file 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); -- cgit v1.2.3-70-g09d2