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:
@@ -859,6 +859,10 @@ namespace OpenRA.Mods.Common.Traits
|
||||
}
|
||||
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)
|
||||
UnReserve();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user