- fixed angle range checks in A_CheckIfTargetInLOS.

The fixed point version had a mostly useless check that excluded ANGLE_MAX, this got incorrectly converted to floating point.
Note that this version will clamp the angle to 360°, not merely overflow like it did with the fixed point code
This commit is contained in:
Christoph Oelckers 2016-09-04 08:33:19 +02:00
parent 2ed4208a1b
commit 77ac3bb265
1 changed files with 3 additions and 1 deletions

View File

@ -4501,7 +4501,9 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfTargetInLOS)
else { target = viewport; viewport = self; }
}
if (fov > 0 && (fov < 360.))
fov = MIN(fov, 360.);
if (fov > 0)
{
DAngle an = absangle(viewport->AngleTo(target), viewport->Angles.Yaw);