diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-17 22:15:25 +0200 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-17 22:15:44 +0200 |
commit | fafaabd67b30e0b4434aa2dc03c8e753ff614bb6 (patch) | |
tree | 0e2f613f9ca5cd2ef936d352098580a004d4affb /src/being.cpp | |
parent | 9330b50231cb038295681874c3060aa97689f31d (diff) | |
download | mv-fafaabd67b30e0b4434aa2dc03c8e753ff614bb6.tar.gz mv-fafaabd67b30e0b4434aa2dc03c8e753ff614bb6.tar.bz2 mv-fafaabd67b30e0b4434aa2dc03c8e753ff614bb6.tar.xz mv-fafaabd67b30e0b4434aa2dc03c8e753ff614bb6.zip |
Fix attack direction.
Diffstat (limited to 'src/being.cpp')
-rw-r--r-- | src/being.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp index 49bcfee90..1d3b78293 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -633,6 +633,10 @@ void Being::handleAttack(Being *victim, int damage, mActionTime = tick_time; } + 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); } |