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 System.Linq;
|
||||||
using OpenRA.Activities;
|
using OpenRA.Activities;
|
||||||
using OpenRA.Mods.Common.Activities;
|
using OpenRA.Mods.Common.Activities;
|
||||||
using OpenRA.Mods.Common.Warheads;
|
|
||||||
using OpenRA.Primitives;
|
using OpenRA.Primitives;
|
||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
@@ -177,8 +176,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
if (IsTraitDisabled)
|
if (IsTraitDisabled)
|
||||||
yield break;
|
yield break;
|
||||||
|
|
||||||
var armament = Armaments.FirstOrDefault(a => a.Weapon.Warheads.Any(w => (w is DamageWarhead)));
|
if (!Armaments.Any())
|
||||||
if (armament == null)
|
|
||||||
yield break;
|
yield break;
|
||||||
|
|
||||||
yield return new AttackOrderTargeter(this, 6);
|
yield return new AttackOrderTargeter(this, 6);
|
||||||
|
|||||||
Reference in New Issue
Block a user