Not that the destination is not always reached, changed headTowards to return the actual tile the unit reached

This commit is contained in:
Yair Morgenstern
2021-01-28 14:50:24 +02:00
parent 0cba94dbcf
commit 852c06ae07

View File

@ -251,7 +251,7 @@ class UnitMovementAlgorithms(val unit:MapUnit) {
fun headTowards(destination: TileInfo): TileInfo {
val destinationTileThisTurn = getTileToMoveToThisTurn(destination)
moveToTile(destinationTileThisTurn)
return destinationTileThisTurn
return unit.currentTile
}
/** This is performance-heavy - use as last resort, only after checking everything else! */