mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-16 10:49:17 +07:00
Added initial pathfinding tests
This commit is contained in:
@ -65,7 +65,7 @@ class UnitMovement(val unit: MapUnit) {
|
||||
}
|
||||
|
||||
if (!distanceToTiles.containsKey(neighbor) || distanceToTiles[neighbor]!!.totalDistance > totalDistanceToTile) { // this is the new best path
|
||||
if (totalDistanceToTile < unitMovement- Constants.minimumMovementEpsilon) // We can still keep moving from here!
|
||||
if (totalDistanceToTile < unitMovement - Constants.minimumMovementEpsilon) // We can still keep moving from here!
|
||||
updatedTiles += neighbor
|
||||
else
|
||||
totalDistanceToTile = unitMovement
|
||||
|
Reference in New Issue
Block a user