From 7becbe6b149fb154840748605d7e0982f77dfc5e Mon Sep 17 00:00:00 2001 From: reaperrr Date: Fri, 26 Apr 2019 01:41:59 +0200 Subject: [PATCH] Allow non-VTOL to LandOnCondition Note: This might still break in unexpected ways, since non-VTOLs implicitly rely on ReturnToBase to calculate the approach vector for them. --- OpenRA.Mods.Common/Traits/Air/Aircraft.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 0b1f02021b..f2f7e1c19e 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -317,13 +317,13 @@ namespace OpenRA.Mods.Common.Traits self.QueueActivity(new TakeOff(self)); } - // Add land activity if LandOnCondidion resolves to true and the actor can land at the current location. + // Add land activity if LandOnCondition resolves to true and the actor can land at the current location. if (!ForceLanding && landNow.HasValue && landNow.Value && airborne && CanLand(self.Location) - && !((self.CurrentActivity is Land && Info.VTOL) || self.CurrentActivity is Turn)) + && !((self.CurrentActivity is Land) || self.CurrentActivity is Turn)) { self.CancelActivity(); - if (Info.TurnToLand) + if (Info.VTOL && Info.TurnToLand) self.QueueActivity(new Turn(self, Info.InitialFacing)); self.QueueActivity(new Land(self)); @@ -625,9 +625,9 @@ namespace OpenRA.Mods.Common.Traits } } - if (!atLandAltitude && Info.VTOL && Info.LandWhenIdle) + if (!atLandAltitude && Info.LandWhenIdle) { - if (Info.TurnToLand) + if (Info.VTOL && Info.TurnToLand) self.QueueActivity(new Turn(self, Info.InitialFacing)); self.QueueActivity(new Land(self));