P_DemoCameraMovement: limit vertical camera aiming if software shearing

This commit is contained in:
James R 2023-12-23 09:02:52 -08:00
parent 8f9c383188
commit 20d9c781c8

View file

@ -3002,7 +3002,23 @@ void P_DemoCameraMovement(camera_t *cam, UINT8 num)
}
}
G_FinalClipAimingPitch((INT32 *)&cam->aiming, NULL, false);
if (rendermode == render_soft
#ifdef HWRENDER
|| (rendermode == render_opengl && (cv_glshearing.value == 1))
#endif
)
{
// Extra restriction on this so it's not possible to
// distort the view too much.
if ((INT32)cam->aiming > ANGLE_45)
cam->aiming = ANGLE_45;
else if ((INT32)cam->aiming < -ANGLE_45)
cam->aiming = -ANGLE_45;
}
else
{
G_ClipAimingPitch((INT32 *)&cam->aiming);
}
cam->momx = cam->momy = cam->momz = 0;