From 583d85cc2ee196cde5ab750d2280b6768311a5f9 Mon Sep 17 00:00:00 2001 From: dnqbob Date: Thu, 6 Oct 2022 18:15:48 +0800 Subject: [PATCH] Allow weapons with no damage warheads to be fired --- OpenRA.Mods.Common/Traits/Attack/AttackBase.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs index 0de73d17a3..1432bef861 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs @@ -14,7 +14,6 @@ using System.Collections.Generic; using System.Linq; using OpenRA.Activities; using OpenRA.Mods.Common.Activities; -using OpenRA.Mods.Common.Warheads; using OpenRA.Primitives; using OpenRA.Traits; @@ -177,8 +176,7 @@ namespace OpenRA.Mods.Common.Traits if (IsTraitDisabled) yield break; - var armament = Armaments.FirstOrDefault(a => a.Weapon.Warheads.Any(w => (w is DamageWarhead))); - if (armament == null) + if (!Armaments.Any()) yield break; yield return new AttackOrderTargeter(this, 6);