Skip to content

Commit

Permalink
Fix ProductionAirdrop landDistance for VTOLs
Browse files Browse the repository at this point in the history
  • Loading branch information
reaperrr committed Jun 30, 2019
1 parent 8d14f6f commit 3d2ff3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion OpenRA.Mods.Cnc/Traits/Buildings/ProductionAirdrop.cs
Expand Up @@ -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<AircraftInfo>();
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
Expand Down

0 comments on commit 3d2ff3c

Please sign in to comment.