Fix Distance check

Before:

http://recordit.co/qFCM2jaox2

After:

http://recordit.co/Jre4B5s1zT
This commit is contained in:
Jesse Woolsey
2016-03-18 19:52:06 -04:00
parent 38d2bd1cee
commit 6cf2fb0a5c
@@ -60,7 +60,7 @@ public abstract class DistancedAction<T extends Mob> extends Action<T> {
executeAction(); executeAction();
// TODO checking the walking queue size is a really cheap fix, and relies on the client not // 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. // 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; reached = true;
setDelay(delay); setDelay(delay);
if (immediate) { if (immediate) {