diff options
author | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-04-11 14:51:24 +0200 |
---|---|---|
committer | Yohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer> | 2011-04-16 00:18:39 +0200 |
commit | 3213901def93ebe3fe648fcbf712f4e9450b8daf (patch) | |
tree | 832d93b67970a39c266b4d25b03fd0fb9cf512e1 /src/being.cpp | |
parent | b57af96f94c19bc6064ac158a6996f0a01c86d68 (diff) | |
download | mana-3213901def93ebe3fe648fcbf712f4e9450b8daf.tar.gz mana-3213901def93ebe3fe648fcbf712f4e9450b8daf.tar.bz2 mana-3213901def93ebe3fe648fcbf712f4e9450b8daf.tar.xz mana-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.cpp | 3 |
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 |