Fix autotarget not checking all attack traits for targets
This commit is contained in:
@@ -303,7 +303,9 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
if (attackStances != PlayerRelationship.None)
|
if (attackStances != PlayerRelationship.None)
|
||||||
{
|
{
|
||||||
var range = Info.ScanRadius > 0 ? WDist.FromCells(Info.ScanRadius) : ab.GetMaximumRange();
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user