Merge pull request #12458 from pchote/map-top-targetability

Reduce aircraft not being targetable at the north edge of the map.
This commit is contained in:
Oliver Brakmann
2016-12-21 21:14:19 +01:00
committed by GitHub
7 changed files with 25 additions and 8 deletions

View File

@@ -42,7 +42,11 @@ namespace OpenRA.Mods.Common.Traits
if (Info.Type == VisibilityType.Footprint)
return byPlayer.Shroud.AnyExplored(self.OccupiesSpace.OccupiedCells());
return byPlayer.Shroud.IsExplored(self.CenterPosition);
var pos = self.CenterPosition;
if (Info.Type == VisibilityType.GroundPosition)
pos -= new WVec(WDist.Zero, WDist.Zero, self.World.Map.DistanceAboveTerrain(pos));
return byPlayer.Shroud.IsExplored(pos);
}
public bool IsVisible(Actor self, Player byPlayer)