mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-03 16:49:11 +00:00
Fix Distance check
Before: http://recordit.co/qFCM2jaox2 After: http://recordit.co/Jre4B5s1zT
This commit is contained in:
@@ -60,7 +60,7 @@ public abstract class DistancedAction<T extends Mob> extends Action<T> {
|
||||
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<T extends Mob> extends Action<T> {
|
||||
*/
|
||||
protected abstract void executeAction();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user