Don't wake sleeping civilians if they're in a city (#7311)

This commit is contained in:
OptimizedForDensity
2022-07-01 02:33:35 -04:00
committed by GitHub
parent 724ac56c62
commit 61509f747e

View File

@ -908,7 +908,7 @@ class MapUnit {
// Wake sleeping units if there's an enemy in vision range:
// Military units always but civilians only if not protected.
if (isSleeping() && (isMilitary() || currentTile.militaryUnit == null) &&
if (isSleeping() && (isMilitary() || (currentTile.militaryUnit == null && !currentTile.isCityCenter())) &&
this.viewableTiles.any {
it.militaryUnit != null && it.militaryUnit!!.civInfo.isAtWarWith(civInfo)
}