From 9ce5baad9e71b859ae98c8653b3c68415494fe5e Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 3 Mar 2024 08:40:24 +0100 Subject: [PATCH] fix ogl freelook breaking with shearing enabled also removed uneeded stuff --- src/r_fps.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/r_fps.c b/src/r_fps.c index 005dab83f..b1f907f53 100644 --- a/src/r_fps.c +++ b/src/r_fps.c @@ -23,6 +23,9 @@ #include "r_state.h" #include "z_zone.h" #include "console.h" // con_startup_loadprogress +#ifdef HWRENDER +#include "hardware/hw_main.h" // for cv_grshearing +#endif static CV_PossibleValue_t fpscap_cons_t[] = { #ifdef DEVELOP @@ -117,14 +120,15 @@ static vector3_t *R_LerpVector3(const vector3_t *from, const vector3_t *to, fixe // recalc necessary stuff for mouseaiming // slopes are already calculated for the full possible view (which is 4*viewheight). // 18/08/18: (No it's actually 16*viewheight, thanks Jimita for finding this out) -static void R_SetupFreelook(player_t *player, boolean skybox) +static void R_SetupFreelook(void) { - (void)player; - (void)skybox; - // clip it in the case we are looking a hardware 90 degrees full aiming // (lmps, network and use F12...) - if (rendermode == render_soft) + if (rendermode == render_soft +#ifdef HWRENDER + || cv_grshearing.value +#endif + ) { G_SoftwareClipAimingPitch((INT32 *)&aimingangle); } @@ -145,7 +149,6 @@ static void R_SetupFreelook(player_t *player, boolean skybox) void R_InterpolateView(fixed_t frac) { viewvars_t* prevview = oldview; - boolean skybox = 0; UINT8 i; if (FIXED_TO_FLOAT(frac) < 0) @@ -183,7 +186,7 @@ void R_InterpolateView(fixed_t frac) viewplayer = newview->player; viewsector = R_PointInSubsector(viewx, viewy)->sector; - R_SetupFreelook(newview->player, skybox); + R_SetupFreelook(); } void R_UpdateViewInterpolation(void)