Replace SequenceActivities with ChildActivity in several activities.

This commit is contained in:
tovl
2019-03-23 19:20:34 +01:00
committed by Paul Chote
parent 90ddf24cf3
commit 30de4df749
5 changed files with 56 additions and 14 deletions

View File

@@ -55,6 +55,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;
}
cargo.Unloading = false;
if (IsCanceling || cargo.IsEmpty(self))
return NextActivity;
@@ -75,8 +82,8 @@ namespace OpenRA.Mods.Common.Activities
if (exitSubCell == null)
{
self.NotifyBlocker(BlockedExitCells(actor));
return ActivityUtils.SequenceActivities(self, new Wait(10), this);
QueueChild(self, new Wait(10), true);
return this;
}
cargo.Unload(self);