From 47085588f64f03ffe6fea5a3766484c3a69aaa79 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 2 May 2017 20:11:41 +0300 Subject: Fix compilation without tmwa support. --- src/being/localplayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/being/localplayer.cpp') diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index d23036820..614f43880 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -784,9 +784,6 @@ void LocalPlayer::attack(Being *const target, const bool keep, if (mTarget != target) setTarget(target); - const int dist_x = target->mX - mX; - const int dist_y = target->mY - mY; - // Must be standing or sitting or casting to attack if (mAction != BeingAction::STAND && mAction != BeingAction::SIT && @@ -796,6 +793,9 @@ void LocalPlayer::attack(Being *const target, const bool keep, } #ifdef TMWA_SUPPORT + const int dist_x = target->mX - mX; + const int dist_y = target->mY - mY; + if (Net::getNetworkType() == ServerType::TMWATHENA) { if (abs(dist_y) >= abs(dist_x)) -- cgit v1.2.3-60-g2f50