mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 17:22:12 +00:00
Fix cv_glshearing 2 in first person
This commit is contained in:
parent
be14b8a564
commit
1950f1c7f7
1 changed files with 11 additions and 4 deletions
15
src/r_main.c
15
src/r_main.c
|
@ -1074,15 +1074,22 @@ subsector_t *R_PointInSubsectorOrNull(fixed_t x, fixed_t y)
|
||||||
// recalc necessary stuff for mouseaiming
|
// recalc necessary stuff for mouseaiming
|
||||||
// slopes are already calculated for the full possible view (which is 4*viewheight).
|
// 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)
|
// 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;
|
INT32 dy = 0;
|
||||||
|
|
||||||
|
#ifndef HWRENDER
|
||||||
|
(void)player;
|
||||||
|
(void)skybox;
|
||||||
|
#endif
|
||||||
|
|
||||||
// clip it in the case we are looking a hardware 90 degrees full aiming
|
// clip it in the case we are looking a hardware 90 degrees full aiming
|
||||||
// (lmps, network and use F12...)
|
// (lmps, network and use F12...)
|
||||||
if (rendermode == render_soft
|
if (rendermode == render_soft
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
|| cv_glshearing.value
|
|| (rendermode == render_opengl
|
||||||
|
&& (cv_glshearing.value == 1
|
||||||
|
|| (cv_glshearing.value == 2 && R_IsViewpointThirdPerson(player, skybox))))
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
@ -1203,7 +1210,7 @@ void R_SetupFrame(player_t *player)
|
||||||
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
|
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
|
||||||
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
|
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
|
||||||
|
|
||||||
R_SetupFreelook();
|
R_SetupFreelook(player, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void R_SkyboxFrame(player_t *player)
|
void R_SkyboxFrame(player_t *player)
|
||||||
|
@ -1340,7 +1347,7 @@ void R_SkyboxFrame(player_t *player)
|
||||||
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
|
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
|
||||||
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
|
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
|
||||||
|
|
||||||
R_SetupFreelook();
|
R_SetupFreelook(player, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean R_ViewpointHasChasecam(player_t *player)
|
boolean R_ViewpointHasChasecam(player_t *player)
|
||||||
|
|
Loading…
Reference in a new issue