Move ChildActivity handling into base Activity class.
This commit is contained in:
@@ -44,20 +44,14 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (assignTargetOnFirstRun)
|
||||
destination = Target.FromCell(self.World, self.Location);
|
||||
|
||||
QueueChild(self, new Land(self, destination, deliverRange), true);
|
||||
QueueChild(self, new Wait(carryall.Info.BeforeUnloadDelay, false), true);
|
||||
QueueChild(self, new ReleaseUnit(self));
|
||||
QueueChild(self, new TakeOff(self));
|
||||
QueueChild(new Land(self, destination, deliverRange));
|
||||
QueueChild(new Wait(carryall.Info.BeforeUnloadDelay, false));
|
||||
QueueChild(new ReleaseUnit(self));
|
||||
QueueChild(new TakeOff(self));
|
||||
}
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
if (ChildActivity != null)
|
||||
{
|
||||
ChildActivity = ActivityUtils.RunActivity(self, ChildActivity);
|
||||
if (ChildActivity != null)
|
||||
return this;
|
||||
}
|
||||
|
||||
return NextActivity;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user