From 5c42f55b3a8c6151d4d1eb090344a8649f9c3ef1 Mon Sep 17 00:00:00 2001 From: BGluth Date: Sat, 4 Aug 2018 02:39:51 -0600 Subject: [PATCH] Fixed aircraft in TS landing instantly to reload their ammo - Updated calculating the landing altitude for the Land activity not taking into account the terrain height. - Fixes 14312. --- OpenRA.Mods.Common/Activities/Air/Land.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Activities/Air/Land.cs b/OpenRA.Mods.Common/Activities/Air/Land.cs index 8d49d3bd26..4edf9a0290 100644 --- a/OpenRA.Mods.Common/Activities/Air/Land.cs +++ b/OpenRA.Mods.Common/Activities/Air/Land.cs @@ -44,7 +44,8 @@ namespace OpenRA.Mods.Common.Activities return NextActivity; } - Fly.FlyToward(self, plane, d.Yaw.Facing, new WDist(target.CenterPosition.Z)); + var landingAlt = self.World.Map.DistanceAboveTerrain(target.CenterPosition); + Fly.FlyToward(self, plane, d.Yaw.Facing, landingAlt); return this; }