thousands here too, on long paths
This commit is contained in:
parent
06dd07dbc6
commit
cf2765e017
@ -109,8 +109,9 @@ public interface IPath {
|
|||||||
default double ticksRemainingFrom(int pathPosition) {
|
default double ticksRemainingFrom(int pathPosition) {
|
||||||
double sum = 0;
|
double sum = 0;
|
||||||
//this is fast because we aren't requesting recalculation, it's just cached
|
//this is fast because we aren't requesting recalculation, it's just cached
|
||||||
for (int i = pathPosition; i < movements().size(); i++) {
|
List<IMovement> movements = movements();
|
||||||
sum += movements().get(i).getCost();
|
for (int i = pathPosition; i < movements.size(); i++) {
|
||||||
|
sum += movements.get(i).getCost();
|
||||||
}
|
}
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user