Restore earlier spy targeting behaviour.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user