mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 01:08:25 +07:00
Fixed modification exception when destroying transported units
This commit is contained in:
@ -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() }
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user