summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-02 20:11:41 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-02 20:11:41 +0300
commit47085588f64f03ffe6fea5a3766484c3a69aaa79 (patch)
treefc8b8664853e080749f673d2146d5373921bc18b /src/being/localplayer.cpp
parent6feaa7a3c79af17e55d0a5d190920a1954d77d38 (diff)
downloadmv-47085588f64f03ffe6fea5a3766484c3a69aaa79.tar.gz
mv-47085588f64f03ffe6fea5a3766484c3a69aaa79.tar.bz2
mv-47085588f64f03ffe6fea5a3766484c3a69aaa79.tar.xz
mv-47085588f64f03ffe6fea5a3766484c3a69aaa79.zip
Fix compilation without tmwa support.
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp6
1 files changed, 3 insertions, 3 deletions
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))