SpawnActorPower no longer forces removal of the spawned actor.

This commit is contained in:
Taryn Hill
2015-04-30 17:26:59 -05:00
parent d279e1dcee
commit 7a4076630f

View File

@@ -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());
}
});
}
}