should be in the synchronized block

This commit is contained in:
Leijurv 2018-11-07 17:23:36 -08:00
parent 40da7b3734
commit 5b395ce3da
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -430,19 +430,17 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
throw new IllegalStateException("I have no idea what to do with this path");
}
}
}
if (talkAboutIt && current != null && current.getPath() != null) {
if (goal == null || goal.isInGoal(current.getPath().getDest())) {
logDebug("Finished finding a path from " + start + " to " + goal + ". " + current.getPath().getNumNodesConsidered() + " nodes considered");
} else {
logDebug("Found path segment from " + start + " towards " + goal + ". " + current.getPath().getNumNodesConsidered() + " nodes considered");
}
}
synchronized (pathCalcLock) {
isPathCalcInProgress = false;
}
}
});
}