Allow weapons with no damage warheads to be fired
This commit is contained in:
committed by
Matthias Mailänder
parent
08de346e31
commit
583d85cc2e
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user