mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-01-31 05:40:44 +00:00
- 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:
parent
2ed4208a1b
commit
77ac3bb265
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue