Change C4Demolition from minutes to ticks; actually use this value.

This commit is contained in:
Paul Chote
2011-03-23 21:07:11 +13:00
parent 6ecf8aaf20
commit 8c18949861
4 changed files with 21 additions and 9 deletions

View File

@@ -18,8 +18,13 @@ namespace OpenRA.Mods.RA.Activities
class Demolish : CancelableActivity
{
Actor target;
public Demolish( Actor target ) { this.target = target; }
int delay;
public Demolish( Actor target, int delay )
{
this.target = target;
this.delay = delay;
}
public override IActivity Tick(Actor self)
{
@@ -29,7 +34,7 @@ namespace OpenRA.Mods.RA.Activities
if( !target.Trait<IOccupySpace>().OccupiedCells().Any( x => x.First == self.Location ) )
return NextActivity;
self.World.AddFrameEndTask(w => w.Add(new DelayedAction(25 * 2,
self.World.AddFrameEndTask(w => w.Add(new DelayedAction(delay,
() => { if (target.IsInWorld) target.Kill(self); })));
return NextActivity;
}