Skip to content

Commit

Permalink
Forgot on check.
Browse files Browse the repository at this point in the history
  • Loading branch information
dileepvr authored and madame-rachelle committed Aug 15, 2024
1 parent c385391 commit 6bb323f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/rendering/hwrenderer/scene/hw_drawinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -452,9 +452,12 @@ void HWDrawInfo::CreateScene(bool drawpsprites)
angle_t a1 = FrustumAngle(); // horizontally clip the back of the viewport
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
portalState.StartFrame();
Expand Down

0 comments on commit 6bb323f

Please sign in to comment.