diff options
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 9729f55d..0b0e22f5 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -1296,13 +1296,11 @@ bool LocalPlayer::withinAttackRange(Being *target) } else { - int dist_x = abs(target->getTileX() - getTileY()); - int dist_y = abs(target->getTileY() - getTileX()); + int dist_x = abs(target->getTileX() - getTileX()); + int dist_y = abs(target->getTileY() - getTileY()); if (dist_x > getAttackRange() || dist_y > getAttackRange()) - { return false; - } return true; } |