mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 05:46:43 -04:00
Not that the destination is not always reached, changed headTowards to return the actual tile the unit reached
This commit is contained in:
parent
0cba94dbcf
commit
852c06ae07
@ -251,7 +251,7 @@ class UnitMovementAlgorithms(val unit:MapUnit) {
|
|||||||
fun headTowards(destination: TileInfo): TileInfo {
|
fun headTowards(destination: TileInfo): TileInfo {
|
||||||
val destinationTileThisTurn = getTileToMoveToThisTurn(destination)
|
val destinationTileThisTurn = getTileToMoveToThisTurn(destination)
|
||||||
moveToTile(destinationTileThisTurn)
|
moveToTile(destinationTileThisTurn)
|
||||||
return destinationTileThisTurn
|
return unit.currentTile
|
||||||
}
|
}
|
||||||
|
|
||||||
/** This is performance-heavy - use as last resort, only after checking everything else! */
|
/** This is performance-heavy - use as last resort, only after checking everything else! */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user