mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-22 13:49:54 +07:00
Fixed a bug where religious units would be expelled when an open borders agreement ended (#5448)
This commit is contained in:
@ -94,7 +94,8 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci
|
|||||||
city.getCenterTile().getUnits().toList().forEach { it.movement.teleportToClosestMoveableTile() }
|
city.getCenterTile().getUnits().toList().forEach { it.movement.teleportToClosestMoveableTile() }
|
||||||
for (tile in city.getTiles()) {
|
for (tile in city.getTiles()) {
|
||||||
for (unit in tile.getUnits().toList()) {
|
for (unit in tile.getUnits().toList()) {
|
||||||
if (!unit.civInfo.canPassThroughTiles(to)) unit.movement.teleportToClosestMoveableTile()
|
if (!unit.civInfo.canPassThroughTiles(to) && !unit.canEnterForeignTerrain)
|
||||||
|
unit.movement.teleportToClosestMoveableTile()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
to.updateViewableTiles()
|
to.updateViewableTiles()
|
||||||
|
Reference in New Issue
Block a user