Resolved #9637 - Concurrent modification fix for liberated city with multiple units in it

This commit is contained in:
Yair Morgenstern 2023-06-23 09:54:33 +03:00
parent b7e4ca358c
commit ee668710e2

View File

@ -225,7 +225,7 @@ class CityInfoConquestFunctions(val city: City){
cityStats.update()
// Move units out of the city when liberated
for (unit in getCenterTile().getUnits())
for (unit in getCenterTile().getUnits().toList())
unit.movement.teleportToClosestMoveableTile()
for (unit in getTiles().flatMap { it.getUnits() }.toList())
if (!unit.movement.canPassThrough(unit.currentTile))