Fixed a bug where religious units would be expelled when an open borders agreement ended (#5448)

This commit is contained in:
Xander Lenstra
2021-10-10 16:10:36 +02:00
committed by GitHub
parent 0ddeb6eb64
commit 24d7a57c1f

View File

@ -94,7 +94,8 @@ class TradeLogic(val ourCivilization:CivilizationInfo, val otherCivilization: Ci
city.getCenterTile().getUnits().toList().forEach { it.movement.teleportToClosestMoveableTile() }
for (tile in city.getTiles()) {
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()