From 00faccdecc3c0d9cd4656be067e6981c3df3040c Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Wed, 19 Dec 2018 17:12:21 +0300 Subject: [PATCH] Fix LandOnCondition causing stopping after changing altitude. --- OpenRA.Mods.Common/Traits/Air/Aircraft.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 1cbf5f0fb2..16be736966 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -292,7 +292,7 @@ namespace OpenRA.Mods.Common.Traits } // Add land activity if LandOnCondidion resolves to true and the actor can land at the current location. - if (landNow.HasValue && landNow.Value && airborne && CanLand(self.Location) + if (!ForceLanding && landNow.HasValue && landNow.Value && airborne && CanLand(self.Location) && !(self.CurrentActivity is HeliLand || self.CurrentActivity is Turn)) { self.CancelActivity(); @@ -306,7 +306,7 @@ namespace OpenRA.Mods.Common.Traits } // Add takeoff activity if LandOnCondidion resolves to false and the actor should not land when idle. - if (landNow.HasValue && !landNow.Value && !cruising && !(self.CurrentActivity is TakeOff)) + if (ForceLanding && landNow.HasValue && !landNow.Value && !cruising && !(self.CurrentActivity is TakeOff)) { ForceLanding = false;