Fix autotarget not checking all attack traits for targets

This commit is contained in:
tjk-ws
2024-06-16 19:09:54 -05:00
committed by Gustas
parent 6a7159e9a1
commit 2a3271b0d0

View File

@@ -303,7 +303,9 @@ namespace OpenRA.Mods.Common.Traits
if (attackStances != PlayerRelationship.None)
{
var range = Info.ScanRadius > 0 ? WDist.FromCells(Info.ScanRadius) : ab.GetMaximumRange();
return ChooseTarget(self, ab, attackStances, range, allowMove, allowTurn);
var target = ChooseTarget(self, ab, attackStances, range, allowMove, allowTurn);
if (target.Type != TargetType.Invalid)
return target;
}
}
}