mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-05 21:11:35 +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 (currentBestPath == null || currentBestPath.totalDistance > totalDistanceToTile) { // this is the new best path
|
||||
if (!distanceToTiles.containsKey(neighbor) || distanceToTiles[neighbor]!!.totalDistance > totalDistanceToTile) { // this is the new best path
|
||||
val usableMovement = if (includeOtherEscortUnit && unit.isEscorting())
|
||||
minOf(unitMovement, unit.getOtherEscortUnit()!!.currentMovement)
|
||||
else unitMovement
|
||||
|
Loading…
Reference in New Issue
Block a user