From 3f718ae7d5bd6dfaa48ebe3f07a7754f4c5ba9fd Mon Sep 17 00:00:00 2001 From: teees Date: Tue, 27 Oct 2015 11:19:56 +0100 Subject: [PATCH] calculate correct altitude with terrain elevation offset --- OpenRA.Mods.Common/Traits/Air/Aircraft.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 95ea12961a..c7d1439e83 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -194,7 +194,7 @@ namespace OpenRA.Mods.Common.Traits return WVec.Zero; // Repulsion only applies when we're flying! - var altitude = CenterPosition.Z; + var altitude = self.World.Map.DistanceAboveTerrain(CenterPosition).Length; if (altitude != Info.CruiseAltitude.Length) return WVec.Zero;