explosions are more or less correct now

This commit is contained in:
Chris Forbes
2009-10-29 22:04:04 +13:00
parent 9d543db7fc
commit 066ce1a203
8 changed files with 47 additions and 25 deletions

View File

@@ -59,9 +59,15 @@ namespace OpenRa.Game
t += 40;
if (t > TotalTime()) /* remove finished bullets */
{
Game.world.AddFrameEndTask(w => w.Remove(this));
Game.world.AddFrameEndTask(w => w.Add(new Explosion(Dest)));
{
Game.world.AddFrameEndTask(w =>
{
w.Remove(this);
w.Add(new Explosion(Dest, Warhead.Explosion));
if (Warhead.ImpactSound != null)
Game.PlaySound(Warhead.ImpactSound + ".aud", false);
});
var maxSpread = GetMaximumSpread();
var hitActors = Game.FindUnitsInCircle(Dest, GetMaximumSpread());