From 6cf2fb0a5c1369941cfa4bb71cf91cf1cdd7431c Mon Sep 17 00:00:00 2001 From: Jesse Woolsey Date: Fri, 18 Mar 2016 19:52:06 -0400 Subject: [PATCH] Fix Distance check Before: http://recordit.co/qFCM2jaox2 After: http://recordit.co/Jre4B5s1zT --- game/src/main/org/apollo/game/action/DistancedAction.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/src/main/org/apollo/game/action/DistancedAction.java b/game/src/main/org/apollo/game/action/DistancedAction.java index d626106a..7da173f3 100644 --- a/game/src/main/org/apollo/game/action/DistancedAction.java +++ b/game/src/main/org/apollo/game/action/DistancedAction.java @@ -60,7 +60,7 @@ public abstract class DistancedAction extends Action { executeAction(); // TODO checking the walking queue size is a really cheap fix, and relies on the client not // being edited... this class needs to be completely re-written. - } else if (mob.getPosition().getDistance(position) <= distance && mob.getWalkingQueue().size() == 0) { + } else if (mob.getPosition().isWithinDistance(position, distance) && mob.getWalkingQueue().size() == 0) { reached = true; setDelay(delay); if (immediate) { @@ -74,4 +74,4 @@ public abstract class DistancedAction extends Action { */ protected abstract void executeAction(); -} \ No newline at end of file +}