Simplify special exits of several acitivities.
This commit is contained in:
@@ -1012,7 +1012,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
// them to land on a resupplier. For aircraft without it, it makes more sense to land than to idle above a
|
||||
// free resupplier.
|
||||
var forceLand = orderString == "ForceEnter" || !Info.TakeOffOnResupply;
|
||||
self.QueueActivity(order.Queued, new ReturnToBase(self, Info.AbortOnResupply, targetActor, forceLand));
|
||||
self.QueueActivity(order.Queued, new ReturnToBase(self, targetActor, forceLand));
|
||||
}
|
||||
else if (orderString == "Stop")
|
||||
{
|
||||
@@ -1036,7 +1036,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// 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.
|
||||
self.QueueActivity(order.Queued, new ReturnToBase(self, Info.AbortOnResupply, null, !Info.TakeOffOnResupply));
|
||||
self.QueueActivity(order.Queued, new ReturnToBase(self, null, !Info.TakeOffOnResupply));
|
||||
}
|
||||
else if (orderString == "Scatter")
|
||||
Nudge(self);
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
var resupplier = ReturnToBase.ChooseResupplier(self, true);
|
||||
if (resupplier != null)
|
||||
self.QueueActivity(new ReturnToBase(self, aircraftInfo.AbortOnResupply, resupplier));
|
||||
self.QueueActivity(new ReturnToBase(self, resupplier));
|
||||
else
|
||||
{
|
||||
// nowhere to land, pick something friendly and circle over it.
|
||||
|
||||
Reference in New Issue
Block a user