Make Aircraft.GetActorBelow() LandAltitude-aware

This commit is contained in:
reaperrr
2019-03-17 21:32:35 +01:00
committed by reaperrr
parent 3211119027
commit b92aef5754

View File

@@ -414,8 +414,8 @@ namespace OpenRA.Mods.Common.Traits
{
// Map.DistanceAboveTerrain(WPos pos) is called directly because Aircraft is an IPositionable trait
// and all calls occur in Tick methods.
if (self.World.Map.DistanceAboveTerrain(CenterPosition).Length != 0)
return null; // not on the ground.
if (self.World.Map.DistanceAboveTerrain(CenterPosition) != Info.LandAltitude)
return null; // Not on the resupplier.
return self.World.ActorMap.GetActorsAt(self.Location)
.FirstOrDefault(a => a.Info.HasTraitInfo<ReservableInfo>());