diff --git a/OpenRa.Game/Shroud.cs b/OpenRa.Game/Shroud.cs index 31dceb8935..6df1da4dc4 100644 --- a/OpenRa.Game/Shroud.cs +++ b/OpenRa.Game/Shroud.cs @@ -114,17 +114,28 @@ namespace OpenRa public void Explore(Actor a) { + var sight = 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); + Explore(a.World, t, sight); } else - Explore(a.World, - (1f / Game.CellSize * a.CenterLocation).ToInt2(), - a.Info.Traits.Get().Sight); + { + var mobile = a.traits.GetOrDefault(); + if (mobile != null) + { + Explore(a.World, mobile.fromCell, sight); + Explore(a.World, mobile.toCell, sight); + } + else + Explore(a.World, + (1f / Game.CellSize * a.CenterLocation).ToInt2(), + sight); + } } static readonly byte[][] SpecialShroudTiles =