mirror of
https://github.com/yairm210/Unciv.git
synced 2025-02-23 21:22:39 +07:00
Stop on Path Blocked (#10758)
* The change * The change properly this time
This commit is contained in:
parent
51e444df6d
commit
af4dea60e0
@ -540,8 +540,12 @@ class MapUnit : IsPartOfGameInfoSerialization {
|
||||
return
|
||||
}
|
||||
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
|
||||
}
|
||||
if (gotTo.position == destinationTile.position) action = null
|
||||
if (currentMovement > 0) doAction()
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user