Convert Attack*.FacingTolerance to WAngle.

This commit is contained in:
Paul Chote
2020-11-28 14:42:16 +00:00
committed by abcdefg30
parent d75fed3a00
commit 77ffc20a5f
14 changed files with 43 additions and 32 deletions

View File

@@ -91,7 +91,7 @@ namespace OpenRA.Mods.Common.Traits
var armaments = ChooseArmamentsForTarget(target, forceAttack);
foreach (var a in armaments)
if (target.IsInRange(pos, a.MaxRange()) && (a.Weapon.MinRange == WDist.Zero || !target.IsInRange(pos, a.Weapon.MinRange)))
if (TargetInFiringArc(self, target, 4 * Info.FacingTolerance))
if (TargetInFiringArc(self, target, Info.FacingTolerance))
return true;
return false;