Queue WaitForTransport childactivity in OnFirstRun.

This commit is contained in:
tovl
2019-06-30 19:46:12 +02:00
committed by teinarss
parent b35dfb50a8
commit 3ac5ac25f6

View File

@@ -18,11 +18,17 @@ namespace OpenRA.Mods.Common.Activities
public class WaitForTransport : Activity public class WaitForTransport : Activity
{ {
readonly ICallForTransport transportable; readonly ICallForTransport transportable;
readonly Activity inner;
public WaitForTransport(Actor self, Activity innerActivity) public WaitForTransport(Actor self, Activity inner)
{ {
transportable = self.TraitOrDefault<ICallForTransport>(); transportable = self.TraitOrDefault<ICallForTransport>();
QueueChild(self, innerActivity); this.inner = inner;
}
protected override void OnFirstRun(Actor self)
{
QueueChild(self, inner);
} }
public override Activity Tick(Actor self) public override Activity Tick(Actor self)