Fix visibility queries when fog is disabled.

This commit is contained in:
Paul Chote
2015-08-14 19:26:01 +01:00
parent 9dabf9019f
commit 738a500876
2 changed files with 15 additions and 1 deletions

View File

@@ -28,6 +28,10 @@ namespace OpenRA.Mods.Common.Traits
protected override bool IsVisibleInner(Actor self, Player byPlayer)
{
// If fog is disabled visibility is determined by shroud
if (!byPlayer.Shroud.FogEnabled)
return base.IsVisibleInner(self, byPlayer);
if (Info.Type == VisibilityType.Footprint)
return self.OccupiesSpace.OccupiedCells()
.Any(o => byPlayer.Shroud.IsVisible(o.First));