From a4595af1e3836620886334db615c7b497f785c2a Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sat, 2 Dec 2017 05:45:23 +0100 Subject: [PATCH] Make AttackOrFleeFuzzy consider all DamageWarheads instead of only the first --- OpenRA.Mods.Common/AI/AttackOrFleeFuzzy.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/AI/AttackOrFleeFuzzy.cs b/OpenRA.Mods.Common/AI/AttackOrFleeFuzzy.cs index 2a4deec947..c8de95b91b 100644 --- a/OpenRA.Mods.Common/AI/AttackOrFleeFuzzy.cs +++ b/OpenRA.Mods.Common/AI/AttackOrFleeFuzzy.cs @@ -221,8 +221,8 @@ namespace OpenRA.Mods.Common.AI var arms = a.TraitsImplementing(); foreach (var arm in arms) { - var warhead = arm.Weapon.Warheads.OfType().FirstOrDefault(); - if (warhead != null) + var damageWarheads = arm.Weapon.Warheads.OfType(); + foreach (var warhead in damageWarheads) sumOfDamage += warhead.Damage; }