From af4dea60e0327804fe0fbb8813c867c34d6039bb Mon Sep 17 00:00:00 2001 From: itanasi <44038014+itanasi@users.noreply.github.com> Date: Sun, 17 Dec 2023 12:03:14 -0800 Subject: [PATCH] Stop on Path Blocked (#10758) * The change * The change properly this time --- core/src/com/unciv/logic/map/mapunit/MapUnit.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/map/mapunit/MapUnit.kt b/core/src/com/unciv/logic/map/mapunit/MapUnit.kt index 935e3f965d..7ed6dd4055 100644 --- a/core/src/com/unciv/logic/map/mapunit/MapUnit.kt +++ b/core/src/com/unciv/logic/map/mapunit/MapUnit.kt @@ -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