mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-16 18:59:15 +07:00
Stop on Path Blocked (#10758)
* The change * The change properly this time
This commit is contained in:
@ -540,8 +540,12 @@ class MapUnit : IsPartOfGameInfoSerialization {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
val gotTo = movement.headTowards(destinationTile)
|
val gotTo = movement.headTowards(destinationTile)
|
||||||
if (gotTo == currentTile) // We didn't move at all
|
if (gotTo == currentTile) { // We didn't move at all
|
||||||
|
// pathway blocked? Are we still at the same spot as start of turn?
|
||||||
|
if(movementMemories.last().position == currentTile.position)
|
||||||
|
action = null
|
||||||
return
|
return
|
||||||
|
}
|
||||||
if (gotTo.position == destinationTile.position) action = null
|
if (gotTo.position == destinationTile.position) action = null
|
||||||
if (currentMovement > 0) doAction()
|
if (currentMovement > 0) doAction()
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user