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.
This commit is contained in:
reaperrr
2019-03-31 23:30:49 +02:00
committed by reaperrr
parent c7eee6ae5d
commit b24e4510c8

View File

@@ -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));
}
}