From 1b6de71bf110c7659857b2f1b538c98300028ac7 Mon Sep 17 00:00:00 2001 From: Fedja Beader Date: Mon, 11 Mar 2024 19:29:50 +0000 Subject: Put variable declarations into scope where they are used. **** Approved-by: Jesusalva Jesusalva --- src/being/localplayer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index a8ffc6175..8f0f7a4cd 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -831,11 +831,11 @@ void LocalPlayer::attack(Being *const target, } #ifdef TMWA_SUPPORT - const int dist_x = target->mX - mX; - const int dist_y = target->mY - mY; - if (Net::getNetworkType() == ServerType::TMWATHENA) { + const int dist_x = target->mX - mX; + const int dist_y = target->mY - mY; + if (abs(dist_y) >= abs(dist_x)) { if (dist_y > 0) -- cgit v1.2.3-60-g2f50