Update ETA formula, assuming heuritic at goal is 0
This commit is contained in:
parent
35f3be9296
commit
303aa79ffb
@ -387,7 +387,7 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
|
||||
if (current == start) {//can't check above because current and start can be equal even if currentPos and startPosition are not
|
||||
return Optional.empty();
|
||||
}
|
||||
double eta = current * ticksElapsedSoFar / (start - current);
|
||||
double eta = Math.abs(current) * ticksElapsedSoFar / Math.abs(start - current);
|
||||
if (eta < 0 || current < 0){
|
||||
return Optional.empty();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user