From 134ac57588b94b58dec015ee12b27a0e39cd80ca Mon Sep 17 00:00:00 2001 From: Yair Morgenstern Date: Sun, 28 Apr 2024 14:29:07 +0300 Subject: [PATCH] Fix tests --- core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt b/core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt index 12991d6ebc..44ab31ae84 100644 --- a/core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt +++ b/core/src/com/unciv/logic/map/mapunit/movement/UnitMovement.kt @@ -438,7 +438,6 @@ class UnitMovement(val unit: MapUnit) { var previousTile = unit.getTile() var passingMovementSpent = 0f // Movement points spent since last tile we could end our turn on - unit.removeFromTile() for (tile in pathToLastReachableTile) { if (!unit.movement.canPassThrough(tile)) { @@ -460,6 +459,7 @@ class UnitMovement(val unit: MapUnit) { if (unit.movement.canMoveTo(tile, assumeCanPassThrough = true)) { lastReachedEnterableTile = tile unit.useMovementPoints(passingMovementSpent) + unit.removeFromTile() unit.putInTile(tile) // Required for ruins, if (escortUnit != null) {