Minor Aircraft ResolveOrder optimization
Streamline RTB if checks.
This commit is contained in:
@@ -1070,10 +1070,10 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
UnReserve();
|
UnReserve();
|
||||||
}
|
}
|
||||||
else if (orderString == "ReturnToBase" && rearmable != null && rearmable.Info.RearmActors.Any())
|
else if (orderString == "ReturnToBase")
|
||||||
{
|
{
|
||||||
// Don't restart activity every time deploy hotkey is triggered
|
// Do nothing if not rearmable and don't restart activity every time deploy hotkey is triggered
|
||||||
if (self.CurrentActivity is ReturnToBase || GetActorBelow() != null)
|
if (rearmable == null || !rearmable.Info.RearmActors.Any() || self.CurrentActivity is ReturnToBase || GetActorBelow() != null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!order.Queued)
|
if (!order.Queued)
|
||||||
|
|||||||
Reference in New Issue
Block a user