add new long WRange.RangeSquared to avoid integer overflows
This commit is contained in:
@@ -66,7 +66,7 @@ namespace OpenRA.Mods.Common.Warheads
|
||||
continue;
|
||||
|
||||
// If the impact position is within any actor's health radius, we have a direct hit
|
||||
if ((unit.CenterPosition - pos).LengthSquared <= healthInfo.Radius.Range * healthInfo.Radius.Range)
|
||||
if ((unit.CenterPosition - pos).LengthSquared <= healthInfo.Radius.RangeSquared)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user