forked from RepoMirrors/baritone
crucial performance optimization
This commit is contained in:
parent
0e1534613c
commit
5382d265f2
|
@ -153,7 +153,7 @@ public final class AStarPathFinder extends AbstractNodeCostSearch {
|
||||||
if (bestHeuristicSoFar[i] - heuristic > minimumImprovement) {
|
if (bestHeuristicSoFar[i] - heuristic > minimumImprovement) {
|
||||||
bestHeuristicSoFar[i] = heuristic;
|
bestHeuristicSoFar[i] = heuristic;
|
||||||
bestSoFar[i] = neighbor;
|
bestSoFar[i] = neighbor;
|
||||||
if (getDistFromStartSq(neighbor) > MIN_DIST_PATH * MIN_DIST_PATH) {
|
if (failing && getDistFromStartSq(neighbor) > MIN_DIST_PATH * MIN_DIST_PATH) {
|
||||||
failing = false;
|
failing = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue