Fix cv_glshearing 2 in first person

This commit is contained in:
Jaime Passos 2020-08-14 20:31:30 -03:00
parent be14b8a564
commit 1950f1c7f7

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)