crucial performance optimization

This commit is contained in:
Leijurv 2019-02-03 19:46:59 -08:00
parent 0e1534613c
commit 5382d265f2
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 1 additions and 1 deletions

View File

@ -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;
} }
} }