Skip to content

Commit

Permalink
Fix attack behaviour of disabled units
Browse files Browse the repository at this point in the history
  • Loading branch information
extmind authored and reaperrr committed Mar 7, 2019
1 parent be741ce commit a6da7fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions OpenRA.Mods.Common/Traits/Attack/AttackBase.cs
Expand Up @@ -124,7 +124,7 @@ protected virtual bool CanAttack(Actor self, Target target)

public virtual void DoAttack(Actor self, Target target, IEnumerable<Armament> armaments = null)
{
if (armaments == null && !CanAttack(self, target))
if (!CanAttack(self, target))
return;

foreach (var a in armaments ?? Armaments)
Expand Down Expand Up @@ -350,7 +350,7 @@ public IEnumerable<Armament> ChooseArmamentsForTarget(Target t, bool forceAttack

public void AttackTarget(Target target, bool queued, bool allowMove, bool forceAttack = false)
{
if (IsTraitDisabled || IsTraitPaused)
if (IsTraitDisabled)
return;

if (!target.IsValidFor(self))
Expand Down

0 comments on commit a6da7fb

Please sign in to comment.