Merge branch 'gl-shearing-fix-2' into 'next'

Fix cv_glshearing 2 in first person

See merge request STJr/SRB2!1114
This commit is contained in:
Lachlan Wright 2020-09-25 08:51:57 -04:00
commit 7fee293034
1 changed files with 11 additions and 4 deletions

View File

@ -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)