Fixed captured units not tp-ing out of liberated cities (#4239)

This commit is contained in:
Arthur van der Staaij 2021-06-23 08:40:55 +02:00 committed by GitHub
parent cf9e00c589
commit 300eb6f726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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