summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-04-11 14:51:24 +0200
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-04-16 00:18:39 +0200
commit3213901def93ebe3fe648fcbf712f4e9450b8daf (patch)
tree832d93b67970a39c266b4d25b03fd0fb9cf512e1 /src/being.cpp
parentb57af96f94c19bc6064ac158a6996f0a01c86d68 (diff)
downloadmana-client-3213901def93ebe3fe648fcbf712f4e9450b8daf.tar.gz
mana-client-3213901def93ebe3fe648fcbf712f4e9450b8daf.tar.bz2
mana-client-3213901def93ebe3fe648fcbf712f4e9450b8daf.tar.xz
mana-client-3213901def93ebe3fe648fcbf712f4e9450b8daf.zip
Made the attackers look at their victims when possible.
That simply make the game a bit more realistic as I saw many archers back fire arrows lately ;) Plus, that's what the servers should expect.
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/being.cpp b/src/being.cpp
index dcad9f9e..9dbff7f4 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -401,6 +401,9 @@ void Being::handleAttack(Being *victim, int damage, AttackType type)
if (this != player_node)
setAction(Being::ATTACK, 1);
+ if (victim)
+ lookAt(victim->getPosition());
+
if (getType() == PLAYER && victim && mEquippedWeapon)
fireMissile(victim, mEquippedWeapon->getMissileParticle());
else