Add GroundPosition VisibilityType.

This commit is contained in:
Paul Chote
2016-11-26 21:10:41 +00:00
parent ef8a7a535d
commit b1f99dd601
3 changed files with 7 additions and 3 deletions

View File

@@ -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();
}