Replace SequenceActivities with ChildActivity in several activities.
This commit is contained in:
@@ -33,6 +33,13 @@ namespace OpenRA.Mods.Common.Activities
|
||||
|
||||
public override Activity Tick(Actor self)
|
||||
{
|
||||
if (ChildActivity != null)
|
||||
{
|
||||
ChildActivity = ActivityUtils.RunActivity(self, ChildActivity);
|
||||
if (ChildActivity != null)
|
||||
return this;
|
||||
}
|
||||
|
||||
if (IsCanceling)
|
||||
return NextActivity;
|
||||
|
||||
@@ -40,10 +47,9 @@ namespace OpenRA.Mods.Common.Activities
|
||||
if (target == null)
|
||||
return this;
|
||||
|
||||
return ActivityUtils.SequenceActivities(self,
|
||||
new AttackMoveActivity(self, () => move.MoveTo(target.Location, 2)),
|
||||
new Wait(25),
|
||||
this);
|
||||
QueueChild(self, new AttackMoveActivity(self, () => move.MoveTo(target.Location, 2)), true);
|
||||
QueueChild(self, new Wait(25));
|
||||
return this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user