diff --git a/src/r_main.c b/src/r_main.c index 4f79dd8db..c99e6c329 100644 --- a/src/r_main.c +++ b/src/r_main.c @@ -1074,15 +1074,22 @@ subsector_t *R_PointInSubsectorOrNull(fixed_t x, fixed_t y) // 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(void) +static void R_SetupFreelook(player_t *player, boolean skybox) { INT32 dy = 0; +#ifndef HWRENDER + (void)player; + (void)skybox; +#endif + // clip it in the case we are looking a hardware 90 degrees full aiming // (lmps, network and use F12...) if (rendermode == render_soft #ifdef HWRENDER - || cv_glshearing.value + || (rendermode == render_opengl + && (cv_glshearing.value == 1 + || (cv_glshearing.value == 2 && R_IsViewpointThirdPerson(player, skybox)))) #endif ) { @@ -1203,7 +1210,7 @@ void R_SetupFrame(player_t *player) viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT); viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT); - R_SetupFreelook(); + R_SetupFreelook(player, false); } void R_SkyboxFrame(player_t *player) @@ -1340,7 +1347,7 @@ void R_SkyboxFrame(player_t *player) viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT); viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT); - R_SetupFreelook(); + R_SetupFreelook(player, true); } boolean R_ViewpointHasChasecam(player_t *player)