diff --git a/OpenRa.Game/Shroud.cs b/OpenRa.Game/Shroud.cs index 59639c5293..44847ef606 100644 --- a/OpenRa.Game/Shroud.cs +++ b/OpenRa.Game/Shroud.cs @@ -7,6 +7,7 @@ using OpenRa.Graphics; using OpenRa.Traits; using OpenRa.FileFormats; using System.Drawing; +using OpenRa.GameRules; namespace OpenRa { @@ -96,9 +97,17 @@ namespace OpenRa public void Explore(Actor a) { - Explore(a.World, - (1f / Game.CellSize * a.CenterLocation).ToInt2(), - a.Info.Traits.Get().Sight); + // Buildings: explore from each cell in the footprint + if (a.Info.Traits.Contains()) + { + var bi = a.Info.Traits.Get(); + foreach (var t in Footprint.Tiles(a.Info.Name, bi, a.Location)) + Explore(a.World,t,a.Info.Traits.Get().Sight); + } + else + Explore(a.World, + (1f / Game.CellSize * a.CenterLocation).ToInt2(), + a.Info.Traits.Get().Sight); } static readonly byte[][] SpecialShroudTiles =