Merge commit '958721e'

This commit is contained in:
Rachael Alexanderson 2024-08-15 13:11:37 -04:00
commit 54d43b2856
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0
7 changed files with 24 additions and 9 deletions

View file

@ -405,9 +405,12 @@ void HWDrawInfo::CreateScene(bool drawpsprites, FRenderState& state)
angle_t a1 = FrustumAngle();
mClipper->SafeAddClipRangeRealAngles(vp.Angles.Yaw.BAMs() + a1, vp.Angles.Yaw.BAMs() - a1);
Viewpoint.FrustAngle = a1;
double a2 = 20.0 + 0.5*Viewpoint.FieldOfView.Degrees(); // FrustumPitch for vertical clipping
if (a2 > 179.0) a2 = 179.0;
vClipper->SafeAddClipRangeDegPitches(vp.HWAngles.Pitch.Degrees() - a2, vp.HWAngles.Pitch.Degrees() + a2); // clip the suplex range
if (Viewpoint.IsAllowedOoB()) // No need for vertical clipper if viewpoint not allowed out of bounds
{
double a2 = 20.0 + 0.5*Viewpoint.FieldOfView.Degrees(); // FrustumPitch for vertical clipping
if (a2 > 179.0) a2 = 179.0;
vClipper->SafeAddClipRangeDegPitches(vp.HWAngles.Pitch.Degrees() - a2, vp.HWAngles.Pitch.Degrees() + a2); // clip the suplex range
}
// reset the portal manager
drawctx->portalState.StartFrame();