Fix ReturnToBase restarting on each hotkey press

Now that the RTB process is a single activity with childs,
it's relatively easy to prevent the activity from restarting
every time the deploy/RTB hotkey is pressed.
This commit is contained in:
reaperrr
2019-03-31 23:58:23 +02:00
committed by reaperrr
parent b24e4510c8
commit 717b8a24f1

View File

@@ -859,6 +859,10 @@ namespace OpenRA.Mods.Common.Traits
} }
else if (order.OrderString == "ReturnToBase" && rearmable != null && rearmable.Info.RearmActors.Any()) else if (order.OrderString == "ReturnToBase" && rearmable != null && rearmable.Info.RearmActors.Any())
{ {
// Don't restart activity every time deploy hotkey is triggered
if (self.CurrentActivity is ReturnToBase)
return;
if (!order.Queued) if (!order.Queued)
UnReserve(); UnReserve();