mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 15:11:46 +00:00
- fixed: A_CheckRange calculated the square twice, resulting in a far too large value that got checked.
This commit is contained in:
parent
24776edd13
commit
b73c6e847a
1 changed files with 1 additions and 1 deletions
|
@ -3120,7 +3120,7 @@ static bool DoCheckSightOrRange(AActor *self, AActor *camera, double range, bool
|
|||
dz = 0;
|
||||
}
|
||||
double distance = DVector3(pos, twodi? 0. : dz).LengthSquared();
|
||||
if (distance <= range*range)
|
||||
if (distance <= range)
|
||||
{
|
||||
// Within range
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue