mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-13 17:28:57 +07:00
Don't wake sleeping civilians if they're in a city (#7311)
This commit is contained in:

committed by
GitHub

parent
724ac56c62
commit
61509f747e
@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user