make ReturnToBase order queueable

This commit is contained in:
tovl
2019-02-15 16:07:14 +01:00
committed by Paul Chote
parent 621a42b7d7
commit 2975738477

View File

@@ -838,12 +838,10 @@ namespace OpenRA.Mods.Common.Traits
}
else if (order.OrderString == "ReturnToBase" && rearmableInfo != null && rearmableInfo.RearmActors.Any())
{
UnReserve();
self.CancelActivity();
if (!Info.CanHover)
self.QueueActivity(new ReturnToBase(self, Info.AbortOnResupply, null, false));
self.QueueActivity(order.Queued, new ReturnToBase(self, Info.AbortOnResupply, null, false));
else
self.QueueActivity(new HeliReturnToBase(self, Info.AbortOnResupply, null, false));
self.QueueActivity(order.Queued, new HeliReturnToBase(self, Info.AbortOnResupply, null, false));
}
}