diff --git a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs index 1fb15f0185..b283073352 100644 --- a/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs +++ b/OpenRA.Mods.Common/Traits/Attack/AttackBase.cs @@ -286,6 +286,14 @@ namespace OpenRA.Mods.Common.Traits if (modifiers.HasModifier(TargetModifiers.ForceMove)) return false; + // Disguised actors are revealed by the attack cursor + // HACK: works around limitations in the targeting code that force the + // targeting and attacking logic (which should be logically separate) + // to use the same code + if (target.Type == TargetType.Actor && target.Actor.EffectiveOwner != null && + target.Actor.EffectiveOwner.Disguised && self.Owner.Stances[target.Actor.Owner] == Stance.Enemy) + modifiers |= TargetModifiers.ForceAttack; + var forceAttack = modifiers.HasModifier(TargetModifiers.ForceAttack); var a = ab.ChooseArmamentsForTarget(target, forceAttack).FirstOrDefault(); if (a == null)