diff --git a/OpenRA.Mods.Common/Traits/Render/WithAttackAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithAttackAnimation.cs index 3e16353140..1947b2e517 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithAttackAnimation.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithAttackAnimation.cs @@ -41,7 +41,7 @@ namespace OpenRA.Mods.Common.Traits.Render public override void RulesetLoaded(Ruleset rules, ActorInfo ai) { - var matches = ai.TraitInfos().Count(w => Body == w.Name); + var matches = ai.TraitInfos().Count(w => w.Name == Body); if (matches != 1) throw new YamlException("WithAttackAnimation needs exactly one sprite body with matching name.");