Merge pull request #9777 from teees/repulsion-fix

calculate correct altitude with terrain elevation offset (aircraft repulsion)
This commit is contained in:
Oliver Brakmann
2015-10-28 20:56:53 +01:00

View File

@@ -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;