From 15a5bde7e7e05cfee950d9ded0283ab5427320ba Mon Sep 17 00:00:00 2001 From: Pavel Penev Date: Thu, 13 Aug 2015 01:41:48 +0300 Subject: [PATCH] Don't stop rearming if ordered to "Stop" while rearming This one actually fixes a bug. --- OpenRA.Mods.Common/Traits/Air/Aircraft.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index 59f416f13b..8ab5610403 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -563,8 +563,14 @@ namespace OpenRA.Mods.Common.Traits } else if (order.OrderString == "Stop") { - UnReserve(); self.CancelActivity(); + if (GetActorBelow() != null) + { + self.QueueActivity(new ResupplyAircraft(self)); + return; + } + + UnReserve(); // TODO: Implement INotifyBecomingIdle instead if (!IsPlane && Info.LandWhenIdle)