Remove a loop closure guard variable

This commit is contained in:
abcdefg30
2020-02-07 14:38:25 +01:00
committed by reaperrr
parent 5c4ec1bf0e
commit aeacc86028

View File

@@ -203,12 +203,10 @@ namespace OpenRA.GameRules
var world = args.SourceActor.World;
foreach (var warhead in Warheads)
{
var wh = warhead; // force the closure to bind to the current warhead
if (wh.Delay > 0)
world.AddFrameEndTask(w => w.Add(new DelayedImpact(wh.Delay, wh, target, args)));
if (warhead.Delay > 0)
world.AddFrameEndTask(w => w.Add(new DelayedImpact(warhead.Delay, warhead, target, args)));
else
wh.DoImpact(target, args);
warhead.DoImpact(target, args);
}
}