From 3ac5ac25f63a79ee660d5679573059de77e7734f Mon Sep 17 00:00:00 2001 From: tovl Date: Sun, 30 Jun 2019 19:46:12 +0200 Subject: [PATCH] Queue WaitForTransport childactivity in OnFirstRun. --- OpenRA.Mods.Common/Activities/WaitForTransport.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Activities/WaitForTransport.cs b/OpenRA.Mods.Common/Activities/WaitForTransport.cs index c217d02485..f1e72cb9fd 100644 --- a/OpenRA.Mods.Common/Activities/WaitForTransport.cs +++ b/OpenRA.Mods.Common/Activities/WaitForTransport.cs @@ -18,11 +18,17 @@ namespace OpenRA.Mods.Common.Activities public class WaitForTransport : Activity { readonly ICallForTransport transportable; + readonly Activity inner; - public WaitForTransport(Actor self, Activity innerActivity) + public WaitForTransport(Actor self, Activity inner) { transportable = self.TraitOrDefault(); - QueueChild(self, innerActivity); + this.inner = inner; + } + + protected override void OnFirstRun(Actor self) + { + QueueChild(self, inner); } public override Activity Tick(Actor self)