mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-06 16:28:40 +07:00
Resolved #9637 - Concurrent modification fix for liberated city with multiple units in it
This commit is contained in:
@ -225,7 +225,7 @@ class CityInfoConquestFunctions(val city: City){
|
|||||||
cityStats.update()
|
cityStats.update()
|
||||||
|
|
||||||
// Move units out of the city when liberated
|
// Move units out of the city when liberated
|
||||||
for (unit in getCenterTile().getUnits())
|
for (unit in getCenterTile().getUnits().toList())
|
||||||
unit.movement.teleportToClosestMoveableTile()
|
unit.movement.teleportToClosestMoveableTile()
|
||||||
for (unit in getTiles().flatMap { it.getUnits() }.toList())
|
for (unit in getTiles().flatMap { it.getUnits() }.toList())
|
||||||
if (!unit.movement.canPassThrough(unit.currentTile))
|
if (!unit.movement.canPassThrough(unit.currentTile))
|
||||||
|
Reference in New Issue
Block a user