unhack that a bit; delayed damage works

This commit is contained in:
Chris Forbes
2010-04-01 18:30:55 +13:00
parent cefee4b1d2
commit dda6a939f1
3 changed files with 21 additions and 5 deletions

View File

@@ -78,11 +78,7 @@ namespace OpenRA.Effects
{
t += 40;
if (t > TotalTime()) /* remove finished bullets */
{
world.AddFrameEndTask(w => w.Remove(this));
Combat.DoImpact(Args.weapon.Warheads[0], Args, VisualDest - new int2(0, Args.destAltitude));
}
if (t > TotalTime()) Explode( world );
if (Info.Trail != null)
{
@@ -126,5 +122,11 @@ namespace OpenRA.Effects
Info.UnderWater ? "shadow" : Args.firedBy.Owner.Palette);
}
}
void Explode( World world )
{
world.AddFrameEndTask(w => w.Remove(this));
Combat.DoImpacts(Args, VisualDest - new int2(0, Args.destAltitude));
}
}
}