Fixed modification exception when destroying transported units
This commit is contained in:
parent
5e5a175f06
commit
f0adc40e81
1 changed files with 1 additions and 1 deletions
|
@ -477,7 +477,7 @@ class MapUnit {
|
|||
civInfo.removeUnit(this)
|
||||
civInfo.updateViewableTiles()
|
||||
// all transported units should be destroyed as well
|
||||
currentTile.getUnits().filter { it.isTransported && isTransportTypeOf(it) }
|
||||
currentTile.getUnits().filter { it.isTransported && isTransportTypeOf(it) }.toList() // because we're changing the list
|
||||
.forEach { unit -> unit.destroy() }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue