diff --git a/OpenRA.Game/GameRules/WeaponInfo.cs b/OpenRA.Game/GameRules/WeaponInfo.cs index 0095f4cea5..c675ace60b 100644 --- a/OpenRA.Game/GameRules/WeaponInfo.cs +++ b/OpenRA.Game/GameRules/WeaponInfo.cs @@ -150,8 +150,9 @@ namespace OpenRA.GameRules ///Applies all the weapon's warheads to the target. public void Impact(Target target, Actor firedBy, IEnumerable damageModifiers) { - foreach (var wh in Warheads) + foreach (var warhead in Warheads) { + var wh = warhead; // force the closure to bind to the current warhead Action a; a = () => wh.DoImpact(target, firedBy, damageModifiers);