Restore earlier spy targeting behaviour.

This commit is contained in:
Paul Chote
2015-11-16 20:39:06 +00:00
parent 124c0ea041
commit 65a7f2e863

View File

@@ -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)