mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
Fixed #2492 - trading cities with units in them no longer crashes the game
This commit is contained in:
@ -97,7 +97,7 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci
|
||||
if (offer.type == TradeType.City) {
|
||||
val city = from.cities.first { it.id == offer.name }
|
||||
city.moveToCiv(to)
|
||||
city.getCenterTile().getUnits().forEach { it.movement.teleportToClosestMoveableTile() }
|
||||
city.getCenterTile().getUnits().toList().forEach { it.movement.teleportToClosestMoveableTile() }
|
||||
to.updateViewableTiles()
|
||||
from.updateViewableTiles()
|
||||
}
|
||||
|
Reference in New Issue
Block a user