diff --git a/OpenRA.Mods.Common/Lint/CheckRevealFootprint.cs b/OpenRA.Mods.Common/Lint/CheckRevealFootprint.cs index 682822542c..afcc5b96a4 100644 --- a/OpenRA.Mods.Common/Lint/CheckRevealFootprint.cs +++ b/OpenRA.Mods.Common/Lint/CheckRevealFootprint.cs @@ -28,7 +28,7 @@ namespace OpenRA.Mods.Common.Lint var ios = actorInfo.Value.TraitInfoOrDefault(); foreach (var rsi in actorInfo.Value.TraitInfos()) { - if (rsi.Type == VisibilityType.CenterPosition) + if (rsi.Type != VisibilityType.Footprint) continue; if (ios == null) diff --git a/OpenRA.Mods.Common/Traits/AffectsShroud.cs b/OpenRA.Mods.Common/Traits/AffectsShroud.cs index 8e8fd93966..f5e1f71741 100644 --- a/OpenRA.Mods.Common/Traits/AffectsShroud.cs +++ b/OpenRA.Mods.Common/Traits/AffectsShroud.cs @@ -53,7 +53,11 @@ namespace OpenRA.Mods.Common.Traits .SelectMany(kv => Shroud.ProjectedCellsInRange(map, kv.First, range, Info.MaxHeightDelta)) .Distinct().ToArray(); - return Shroud.ProjectedCellsInRange(map, self.CenterPosition, range, Info.MaxHeightDelta) + var pos = self.CenterPosition; + if (Info.Type == VisibilityType.GroundPosition) + pos -= new WVec(WDist.Zero, WDist.Zero, self.World.Map.DistanceAboveTerrain(pos)); + + return Shroud.ProjectedCellsInRange(map, pos, range, Info.MaxHeightDelta) .ToArray(); } diff --git a/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs b/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs index 5234ce7e4d..bbedbcfc7c 100644 --- a/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs +++ b/OpenRA.Mods.Common/Traits/Modifiers/HiddenUnderShroud.cs @@ -15,7 +15,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.Common.Traits { - public enum VisibilityType { Footprint, CenterPosition } + public enum VisibilityType { Footprint, CenterPosition, GroundPosition } [Desc("The actor stays invisible under the shroud.")] public class HiddenUnderShroudInfo : ITraitInfo, IDefaultVisibilityInfo