mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 12:31:54 +00:00
Move software shearing conditions from R_SetupFreelook into G_FinalClipAimingPitch
This commit is contained in:
parent
bf14773b21
commit
5a973734d0
3 changed files with 31 additions and 20 deletions
29
src/g_game.c
29
src/g_game.c
|
|
@ -76,6 +76,10 @@
|
||||||
#include "discord.h"
|
#include "discord.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HWRENDER
|
||||||
|
#include "hardware/hw_main.h" // for cv_glshearing
|
||||||
|
#endif
|
||||||
|
|
||||||
gameaction_t gameaction;
|
gameaction_t gameaction;
|
||||||
gamestate_t gamestate = GS_NULL;
|
gamestate_t gamestate = GS_NULL;
|
||||||
UINT8 ultimatemode = false;
|
UINT8 ultimatemode = false;
|
||||||
|
|
@ -871,6 +875,31 @@ INT16 G_SoftwareClipAimingPitch(INT32 *aiming)
|
||||||
return (INT16)((*aiming)>>16);
|
return (INT16)((*aiming)>>16);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void G_FinalClipAimingPitch(INT32 *aiming, player_t *player, boolean skybox)
|
||||||
|
{
|
||||||
|
#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
|
||||||
|
|| (rendermode == render_opengl
|
||||||
|
&& (cv_glshearing.value == 1
|
||||||
|
|| (cv_glshearing.value == 2 && R_IsViewpointThirdPerson(player, skybox))))
|
||||||
|
#endif
|
||||||
|
)
|
||||||
|
{
|
||||||
|
G_SoftwareClipAimingPitch(aiming);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
G_ClipAimingPitch(aiming);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static INT32 G_GetValueFromControlTable(INT32 deviceID, INT32 deadzone, INT32 *controltable)
|
static INT32 G_GetValueFromControlTable(INT32 deviceID, INT32 deadzone, INT32 *controltable)
|
||||||
{
|
{
|
||||||
INT32 i, failret = NO_BINDS_REACHABLE;
|
INT32 i, failret = NO_BINDS_REACHABLE;
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ ticcmd_t *G_MoveTiccmd(ticcmd_t* dest, const ticcmd_t* src, const size_t n);
|
||||||
// clip the console player aiming to the view
|
// clip the console player aiming to the view
|
||||||
INT32 G_ClipAimingPitch(INT32 *aiming);
|
INT32 G_ClipAimingPitch(INT32 *aiming);
|
||||||
INT16 G_SoftwareClipAimingPitch(INT32 *aiming);
|
INT16 G_SoftwareClipAimingPitch(INT32 *aiming);
|
||||||
|
void G_FinalClipAimingPitch(INT32 *aiming, player_t *player, boolean skybox);
|
||||||
|
|
||||||
extern angle_t localangle[MAXSPLITSCREENPLAYERS];
|
extern angle_t localangle[MAXSPLITSCREENPLAYERS];
|
||||||
extern INT32 localaiming[MAXSPLITSCREENPLAYERS]; // should be an angle_t but signed
|
extern INT32 localaiming[MAXSPLITSCREENPLAYERS]; // should be an angle_t but signed
|
||||||
|
|
|
||||||
21
src/r_fps.c
21
src/r_fps.c
|
|
@ -22,9 +22,6 @@
|
||||||
#include "r_state.h"
|
#include "r_state.h"
|
||||||
#include "z_zone.h"
|
#include "z_zone.h"
|
||||||
#include "console.h" // con_startup_loadprogress
|
#include "console.h" // con_startup_loadprogress
|
||||||
#ifdef HWRENDER
|
|
||||||
#include "hardware/hw_main.h" // for cv_glshearing
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static CV_PossibleValue_t fpscap_cons_t[] = {
|
static CV_PossibleValue_t fpscap_cons_t[] = {
|
||||||
#ifdef DEVELOP
|
#ifdef DEVELOP
|
||||||
|
|
@ -117,23 +114,7 @@ static vector3_t *R_LerpVector3(const vector3_t *from, const vector3_t *to, fixe
|
||||||
// 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(player_t *player, boolean skybox)
|
static void R_SetupFreelook(player_t *player, boolean skybox)
|
||||||
{
|
{
|
||||||
#ifndef HWRENDER
|
G_FinalClipAimingPitch((INT32 *)&aimingangle, player, skybox);
|
||||||
(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
|
|
||||||
|| (rendermode == render_opengl
|
|
||||||
&& (cv_glshearing.value == 1
|
|
||||||
|| (cv_glshearing.value == 2 && R_IsViewpointThirdPerson(player, skybox))))
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
G_SoftwareClipAimingPitch((INT32 *)&aimingangle);
|
|
||||||
}
|
|
||||||
|
|
||||||
centeryfrac = (viewheight/2)<<FRACBITS;
|
centeryfrac = (viewheight/2)<<FRACBITS;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue