From b24e4510c8c258c04674b35a132882b066c6aa36 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 31 Mar 2019 23:30:49 +0200 Subject: [PATCH] Make aircraft without TakeOffOnResupply always land on resupplier, even if ammo is full, when given a "ReturnToBase" order via deploy key. In other words, in that case treat the RTB order like an explicit "Repair" or "Enter" order. --- OpenRA.Mods.Common/Traits/Air/Aircraft.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs index fda0590fe4..75fb8d5065 100644 --- a/OpenRA.Mods.Common/Traits/Air/Aircraft.cs +++ b/OpenRA.Mods.Common/Traits/Air/Aircraft.cs @@ -862,7 +862,9 @@ namespace OpenRA.Mods.Common.Traits if (!order.Queued) UnReserve(); - self.QueueActivity(order.Queued, new ReturnToBase(self, Info.AbortOnResupply, null, false)); + // Aircraft with TakeOffOnResupply would immediately take off again, so there's no point in forcing them to land + // on a resupplier. For aircraft without it, it makes more sense to land than to idle above a free resupplier, though. + self.QueueActivity(order.Queued, new ReturnToBase(self, Info.AbortOnResupply, null, !Info.TakeOffOnResupply)); } }