Persist the nuke beacon until detonation.

This commit is contained in:
Paul Chote
2014-04-06 20:11:36 +12:00
parent 3ad35cb803
commit 86f5a39d86
4 changed files with 17 additions and 0 deletions

View File

@@ -32,6 +32,9 @@ namespace OpenRA.Mods.RA
[Desc("Descend immediately on the target, with half the FlightDelay")]
public readonly bool SkipAscent = false;
[Desc("Amount of time before detonation to remove the beacon")]
public readonly int BeaconRemoveAdvance = 25;
[ActorReference]
[Desc("Actor to spawn before detonation")]
public readonly string CameraActor = null;
@@ -93,6 +96,17 @@ namespace OpenRA.Mods.RA
Action addCamera = () => self.World.AddFrameEndTask(w => w.Add(camera));
self.World.AddFrameEndTask(w => w.Add(new DelayedAction(npi.FlightDelay - npi.CameraSpawnAdvance, addCamera)));
}
if (beacon != null)
{
Action removeBeacon = () => self.World.AddFrameEndTask(w =>
{
w.Remove(beacon);
beacon = null;
});
self.World.AddFrameEndTask(w => w.Add(new DelayedAction(npi.FlightDelay - npi.BeaconRemoveAdvance, removeBeacon)));
}
}
}
}