From 809cb160754bf43b5437e0f1f2c699ff69cf7ced Mon Sep 17 00:00:00 2001 From: dnqbob Date: Fri, 1 Sep 2023 14:28:48 +0800 Subject: [PATCH] Fix Target.Invalid comparion bug in AutoTarget --- OpenRA.Mods.Common/Traits/AutoTarget.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/AutoTarget.cs b/OpenRA.Mods.Common/Traits/AutoTarget.cs index da2fb44b36..4194c7751a 100644 --- a/OpenRA.Mods.Common/Traits/AutoTarget.cs +++ b/OpenRA.Mods.Common/Traits/AutoTarget.cs @@ -258,7 +258,7 @@ namespace OpenRA.Mods.Common.Traits { var autoTarget = ScanForTarget(self, AllowMove, true); - if (autoTarget != Target.Invalid) + if (autoTarget.Type != TargetType.Invalid) attacker = autoTarget.Actor; }