summaryrefslogtreecommitdiff
path: root/src/being/being.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-01-22 00:13:32 +0300
committerAndrei Karas <akaras@inbox.ru>2015-01-22 00:13:32 +0300
commit4e50d7314f67f6e6fc307a6270d2b6dab598f5ea (patch)
tree7fa0da0524b32b5ed578f8fc7b25456f3f5b51b5 /src/being/being.cpp
parent9cbd54f5fe3b06eabdb1290ebbffe42257f460f8 (diff)
downloadplus-4e50d7314f67f6e6fc307a6270d2b6dab598f5ea.tar.gz
plus-4e50d7314f67f6e6fc307a6270d2b6dab598f5ea.tar.bz2
plus-4e50d7314f67f6e6fc307a6270d2b6dab598f5ea.tar.xz
plus-4e50d7314f67f6e6fc307a6270d2b6dab598f5ea.zip
Impliment server feature haveAttackDirections.
Diffstat (limited to 'src/being/being.cpp')
-rw-r--r--src/being/being.cpp5
1 files changed, 3 insertions, 2 deletions
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());