From 5382d265f2ba13045fcc77af8132293c521ac5dc Mon Sep 17 00:00:00 2001 From: Leijurv Date: Sun, 3 Feb 2019 19:46:59 -0800 Subject: [PATCH] crucial performance optimization --- src/main/java/baritone/pathing/calc/AStarPathFinder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/baritone/pathing/calc/AStarPathFinder.java b/src/main/java/baritone/pathing/calc/AStarPathFinder.java index 6f44fac27..fda41cfdc 100644 --- a/src/main/java/baritone/pathing/calc/AStarPathFinder.java +++ b/src/main/java/baritone/pathing/calc/AStarPathFinder.java @@ -153,7 +153,7 @@ public final class AStarPathFinder extends AbstractNodeCostSearch { if (bestHeuristicSoFar[i] - heuristic > minimumImprovement) { bestHeuristicSoFar[i] = heuristic; bestSoFar[i] = neighbor; - if (getDistFromStartSq(neighbor) > MIN_DIST_PATH * MIN_DIST_PATH) { + if (failing && getDistFromStartSq(neighbor) > MIN_DIST_PATH * MIN_DIST_PATH) { failing = false; } }