- fixed: A_CheckRange calculated the square twice, resulting in a far too large value that got checked.

This commit is contained in:
Christoph Oelckers 2016-04-15 18:46:31 +02:00
parent 24776edd13
commit b73c6e847a

View file

@ -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;