summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2011-03-19 02:45:52 +0200
committerAndrei Karas <akaras@inbox.ru>2011-03-19 02:45:52 +0200
commit1ea14cd03b6172681a3dff0b31d4088af3b1b5eb (patch)
tree0e168b993029c84db6c57a1cc39a4f9cf2661cb1 /src/being.cpp
parent3bf63452bfc54cd56395477eb0cb45cb18af6c09 (diff)
downloadManaVerse-1ea14cd03b6172681a3dff0b31d4088af3b1b5eb.tar.gz
ManaVerse-1ea14cd03b6172681a3dff0b31d4088af3b1b5eb.tar.bz2
ManaVerse-1ea14cd03b6172681a3dff0b31d4088af3b1b5eb.tar.xz
ManaVerse-1ea14cd03b6172681a3dff0b31d4088af3b1b5eb.zip
Fix self rotation while attacking.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp9
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);