Check if navigator is navigating in waypoints

This commit is contained in:
fullwall 2012-09-10 20:20:01 +08:00
parent 3c5eb390a6
commit 2c8ed97c42

View File

@ -250,7 +250,8 @@ public class LinearWaypointProvider implements WaypointProvider {
@Override
public boolean shouldExecute(GoalSelector selector) {
if (paused || currentDestination != null || !npc.isSpawned() || waypoints.size() == 0)
if (paused || currentDestination != null || !npc.isSpawned() || getNavigator().isNavigating()
|| waypoints.size() == 0)
return false;
if (waypoints.size() == 1) {
// avoid pathing to the same point and wasting memory.