From 7a4076630f6b89a42e6c11c6689f6135fc4675d0 Mon Sep 17 00:00:00 2001 From: Taryn Hill Date: Thu, 30 Apr 2015 17:26:59 -0500 Subject: [PATCH] SpawnActorPower no longer forces removal of the spawned actor. --- .../Traits/SupportPowers/SpawnActorPower.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/SupportPowers/SpawnActorPower.cs b/OpenRA.Mods.Common/Traits/SupportPowers/SpawnActorPower.cs index 8a0bf90400..56f7704a2b 100644 --- a/OpenRA.Mods.Common/Traits/SupportPowers/SpawnActorPower.cs +++ b/OpenRA.Mods.Common/Traits/SupportPowers/SpawnActorPower.cs @@ -21,7 +21,7 @@ namespace OpenRA.Mods.Common.Traits [Desc("Actor to spawn.")] public readonly string Actor = null; - [Desc("Amount of time to keep the actor alive in ticks.")] + [Desc("Amount of time to keep the actor alive in ticks. Value < 0 means this actor will not remove itself.")] public readonly int LifeTime = 250; public readonly string DeploySound = null; @@ -58,8 +58,11 @@ namespace OpenRA.Mods.Common.Traits new OwnerInit(self.Owner), }); - actor.QueueActivity(new Wait(info.LifeTime)); - actor.QueueActivity(new RemoveSelf()); + if (info.LifeTime > -1) + { + actor.QueueActivity(new Wait(info.LifeTime)); + actor.QueueActivity(new RemoveSelf()); + } }); } }