diff --git a/OpenRA.Game/GameRules/WeaponInfo.cs b/OpenRA.Game/GameRules/WeaponInfo.cs
index ae7b57ce9e..6f8b9c0599 100644
--- a/OpenRA.Game/GameRules/WeaponInfo.cs
+++ b/OpenRA.Game/GameRules/WeaponInfo.cs
@@ -99,7 +99,7 @@ namespace OpenRA.GameRules
[Desc("Number of shots in a single ammo magazine.")]
public readonly int Burst = 1;
- [Desc("Can this weapon target attacker itself.")]
+ [Desc("Can this weapon target the attacker itself?")]
public readonly bool CanTargetSelf = false;
[Desc("What types of targets are affected.")]
@@ -214,15 +214,7 @@ namespace OpenRA.GameRules
var targetTypes = victim.GetEnabledTargetTypes();
- if (!IsValidTarget(targetTypes))
- return false;
-
- // PERF: Avoid LINQ.
- foreach (var warhead in Warheads)
- if (warhead.IsValidAgainst(victim, firedBy))
- return true;
-
- return false;
+ return IsValidTarget(targetTypes);
}
/// Checks if the weapon is valid against (can target) the frozen actor.
@@ -231,13 +223,7 @@ namespace OpenRA.GameRules
if (!CanTargetSelf && victim.Actor == firedBy)
return false;
- if (!IsValidTarget(victim.TargetTypes))
- return false;
-
- if (!Warheads.Any(w => w.IsValidAgainst(victim, firedBy)))
- return false;
-
- return true;
+ return IsValidTarget(victim.TargetTypes);
}
/// Applies all the weapon's warheads to the target.