From 7d695f0c8f52a8d47c0da8dc4ab9d71aa7ed65ef Mon Sep 17 00:00:00 2001 From: reaperrr Date: Mon, 27 Aug 2018 01:09:40 +0200 Subject: [PATCH] Fix actors in ReturnFire stance following targets On bleed, if AllowMovement is true actors with ReturnFire will actually follow the acquired target, unlike in Defend stance. This is at least unintuitive, since ReturnFire is expected to be more passive than Defend. --- OpenRA.Mods.Common/Traits/AutoTarget.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/AutoTarget.cs b/OpenRA.Mods.Common/Traits/AutoTarget.cs index 0ac5d52459..e1255c213e 100644 --- a/OpenRA.Mods.Common/Traits/AutoTarget.cs +++ b/OpenRA.Mods.Common/Traits/AutoTarget.cs @@ -19,7 +19,7 @@ namespace OpenRA.Mods.Common.Traits [Desc("The actor will automatically engage the enemy when it is in range.")] public class AutoTargetInfo : ConditionalTraitInfo, IRulesetLoaded, Requires, UsesInit { - [Desc("It will try to hunt down the enemy if it is not set to defend.")] + [Desc("It will try to hunt down the enemy if it is set to AttackAnything.")] public readonly bool AllowMovement = true; [Desc("Set to a value >1 to override weapons maximum range for this.")] @@ -206,7 +206,7 @@ namespace OpenRA.Mods.Common.Traits bool ShouldAttack(out bool allowMove) { - allowMove = Info.AllowMovement && Stance != UnitStance.Defend; + allowMove = Info.AllowMovement && Stance > UnitStance.Defend; // PERF: Avoid LINQ. foreach (var attackFollow in attackFollows)