From 20d9c781c85a2ba6684ffe934775593c6e9411c0 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 23 Dec 2023 09:02:52 -0800 Subject: [PATCH] P_DemoCameraMovement: limit vertical camera aiming if software shearing --- src/p_user.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index f5914711f..c22651e78 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -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;