option to fully disable path backtracking cost favoring

This commit is contained in:
Leijurv 2018-08-17 16:17:14 -07:00
parent 03ec4d39ee
commit b742704fd0
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@ public class Settings {
));
public Setting<Boolean> renderGoal = new Setting<>(true);
public Setting<Integer> pathingMaxChunkBorderFetch = new Setting<>(50);
public Setting<Boolean> backtrackCostFavor = new Setting<>(true);
public Setting<Double> backtrackCostFavoringCoefficient = new Setting<>(0.9); // see issue #18
public Setting<Float> pathRenderLineWidth = new Setting<>(5F);
public Setting<Float> goalRenderLineWidth = new Setting<>(3F);

View File

@ -93,7 +93,7 @@ public class AStarPathFinder extends AbstractNodeCostSearch implements Helper {
long lastPrintout = 0;
int numNodes = 0;
int numEmptyChunk = 0;
boolean favoring = favoredPositions.isPresent(); // grab all settings beforehand so that changing settings during pathing doesn't cause a crash or unpredictable behavior
boolean favoring = favoredPositions.isPresent() && Baritone.settings().backtrackCostFavor.get(); // grab all settings beforehand so that changing settings during pathing doesn't cause a crash or unpredictable behavior
boolean cache = Baritone.settings().chuckCaching.get();
int pathingMaxChunkBorderFetch = Baritone.settings().pathingMaxChunkBorderFetch.get();
double favorCoeff = Baritone.settings().backtrackCostFavoringCoefficient.get();