From 3213901def93ebe3fe648fcbf712f4e9450b8daf Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Mon, 11 Apr 2011 14:51:24 +0200 Subject: 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. --- src/being.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/being.cpp') 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 -- cgit v1.2.3-70-g09d2