mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-07 14:02:48 +07:00
Revert "perf: minor speedup in distance to tiles"
This reverts commit f78fbfd22d
.
This commit is contained in:
parent
f78fbfd22d
commit
14115cdea7
@ -69,8 +69,7 @@ class UnitMovement(val unit: MapUnit) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
val currentBestPath = distanceToTiles[neighbor]
|
if (!distanceToTiles.containsKey(neighbor) || distanceToTiles[neighbor]!!.totalDistance > totalDistanceToTile) { // this is the new best path
|
||||||
if (currentBestPath == null || currentBestPath.totalDistance > totalDistanceToTile) { // this is the new best path
|
|
||||||
val usableMovement = if (includeOtherEscortUnit && unit.isEscorting())
|
val usableMovement = if (includeOtherEscortUnit && unit.isEscorting())
|
||||||
minOf(unitMovement, unit.getOtherEscortUnit()!!.currentMovement)
|
minOf(unitMovement, unit.getOtherEscortUnit()!!.currentMovement)
|
||||||
else unitMovement
|
else unitMovement
|
||||||
|
Loading…
Reference in New Issue
Block a user