From 3d2ff3c5ac84935a8524a87aeb09f48a809c1ea0 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 30 Jun 2019 20:35:17 +0200 Subject: [PATCH] Fix ProductionAirdrop landDistance for VTOLs --- OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs b/OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs index ca697103d4fd..c25a83bc0f03 100644 --- a/OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs +++ b/OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs @@ -45,9 +45,10 @@ public override bool Produce(Actor self, ActorInfo producee, string productionTy var info = (ProductionAirdropInfo)Info; var owner = self.Owner; var aircraftInfo = self.World.Map.Rules.Actors[info.ActorType].TraitInfo(); + var isVTOL = aircraftInfo.FlightDynamics.HasFlag(FlightDynamic.VTOL); // WDist required to take off or land - var landDistance = aircraftInfo.CruiseAltitude.Length * 1024 / aircraftInfo.MaximumPitch.Tan(); + var landDistance = !isVTOL ? aircraftInfo.CruiseAltitude.Length * 1024 / aircraftInfo.MaximumPitch.Tan() : 0; // Start a fixed distance away: the width of the map. // This makes the production timing independent of spawnpoint