summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-03-11 19:29:50 +0000
committerFedja Beader <fedja@protonmail.ch>2024-03-11 19:29:50 +0000
commit1b6de71bf110c7659857b2f1b538c98300028ac7 (patch)
treeebc1587a606b74eb4136be15ce800d80abd01053
parent7dc00dfc9ed1b5feb1e3200ac20059592bd1bec4 (diff)
downloadManaVerse-1b6de71bf110c7659857b2f1b538c98300028ac7.tar.gz
ManaVerse-1b6de71bf110c7659857b2f1b538c98300028ac7.tar.bz2
ManaVerse-1b6de71bf110c7659857b2f1b538c98300028ac7.tar.xz
ManaVerse-1b6de71bf110c7659857b2f1b538c98300028ac7.zip
Put variable declarations into scope where they are used.
**** Approved-by: Jesusalva Jesusalva <jesusalva@themanaworld.org>
-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 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)