From 4e50d7314f67f6e6fc307a6270d2b6dab598f5ea Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 22 Jan 2015 00:13:32 +0300 Subject: Impliment server feature haveAttackDirections. --- src/being/being.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/being/being.cpp') diff --git a/src/being/being.cpp b/src/being/being.cpp index 2e64a9cd9..616acf99a 100644 --- a/src/being/being.cpp +++ b/src/being/being.cpp @@ -813,13 +813,14 @@ void Being::handleAttack(Being *const victim, const int damage, reset(); mActionTime = tick_time; - if (this != localPlayer) + if (!serverFeatures->haveAttackDirections() && this != localPlayer) { const uint8_t dir = calcDirection(victim->getTileX(), victim->getTileY()); if (dir) setDirection(dir); } + if (damage && victim->mType == ActorType::Player && victim->mAction == BeingAction::SIT) { @@ -868,7 +869,7 @@ void Being::handleSkill(Being *const victim, const int damage, reset(); mActionTime = tick_time; - if (this != localPlayer) + if (!serverFeatures->haveAttackDirections() && this != localPlayer) { const uint8_t dir = calcDirection(victim->getTileX(), victim->getTileY()); -- cgit v1.2.3-60-g2f50