Browse Source

ref: remove SetCullState function from StudioAPI. It does nothing on GoldSrc.

pull/2/head
Alibek Omarov 2 years ago
parent
commit
277bead9b7
  1. 7
      ref/gl/gl_studio.c
  2. 7
      ref/soft/r_studio.c

7
ref/gl/gl_studio.c

@ -135,7 +135,6 @@ mstudiobodyparts_t *m_pBodyPart;
player_info_t *m_pPlayerInfo; player_info_t *m_pPlayerInfo;
studiohdr_t *m_pStudioHeader; studiohdr_t *m_pStudioHeader;
float m_flGaitMovement; float m_flGaitMovement;
int g_iBackFaceCull;
int g_nTopColor, g_nBottomColor; // remap colors int g_nTopColor, g_nBottomColor; // remap colors
int g_nFaceFlags, g_nForceFaceFlags; int g_nFaceFlags, g_nForceFaceFlags;
@ -1839,7 +1838,7 @@ sets true for enable backculling (for left-hand viewmodel)
*/ */
void R_StudioSetCullState( int iCull ) void R_StudioSetCullState( int iCull )
{ {
g_iBackFaceCull = iCull; // This function intentionally does nothing
} }
/* /*
@ -3664,7 +3663,7 @@ void R_DrawViewModel( void )
RI.currentmodel = RI.currententity->model; RI.currentmodel = RI.currententity->model;
// backface culling for left-handed weapons // backface culling for left-handed weapons
if( R_AllowFlipViewModel( RI.currententity ) || g_iBackFaceCull ) if( R_AllowFlipViewModel( RI.currententity ))
{ {
tr.fFlipViewModel = true; tr.fFlipViewModel = true;
pglFrontFace( GL_CW ); pglFrontFace( GL_CW );
@ -3685,7 +3684,7 @@ void R_DrawViewModel( void )
pglDepthRange( gldepthmin, gldepthmax ); pglDepthRange( gldepthmin, gldepthmax );
// backface culling for left-handed weapons // backface culling for left-handed weapons
if( R_AllowFlipViewModel( RI.currententity ) || g_iBackFaceCull ) if( R_AllowFlipViewModel( RI.currententity ))
{ {
tr.fFlipViewModel = false; tr.fFlipViewModel = false;
pglFrontFace( GL_CCW ); pglFrontFace( GL_CCW );

7
ref/soft/r_studio.c

@ -131,7 +131,6 @@ mstudiobodyparts_t *m_pBodyPart;
player_info_t *m_pPlayerInfo; player_info_t *m_pPlayerInfo;
studiohdr_t *m_pStudioHeader; studiohdr_t *m_pStudioHeader;
float m_flGaitMovement; float m_flGaitMovement;
int g_iBackFaceCull;
int g_nTopColor, g_nBottomColor; // remap colors int g_nTopColor, g_nBottomColor; // remap colors
int g_nFaceFlags, g_nForceFaceFlags; int g_nFaceFlags, g_nForceFaceFlags;
@ -1836,7 +1835,7 @@ sets true for enable backculling (for left-hand viewmodel)
*/ */
void R_StudioSetCullState( int iCull ) void R_StudioSetCullState( int iCull )
{ {
g_iBackFaceCull = iCull; // This function intentionally does nothing
} }
/* /*
@ -3443,7 +3442,7 @@ void R_DrawViewModel( void )
RI.currentmodel = RI.currententity->model; RI.currentmodel = RI.currententity->model;
// backface culling for left-handed weapons // backface culling for left-handed weapons
if( R_AllowFlipViewModel( RI.currententity ) || g_iBackFaceCull ) if( R_AllowFlipViewModel( RI.currententity ))
{ {
tr.fFlipViewModel = true; tr.fFlipViewModel = true;
//pglFrontFace( GL_CW ); //pglFrontFace( GL_CW );
@ -3465,7 +3464,7 @@ void R_DrawViewModel( void )
s_ziscale = (float)0x8000 * (float)0x10000; s_ziscale = (float)0x8000 * (float)0x10000;
// backface culling for left-handed weapons // backface culling for left-handed weapons
if( R_AllowFlipViewModel( RI.currententity ) || g_iBackFaceCull ) if( R_AllowFlipViewModel( RI.currententity ))
{ {
tr.fFlipViewModel = false; tr.fFlipViewModel = false;
//pglFrontFace( GL_CCW ); //pglFrontFace( GL_CCW );

Loading…
Cancel
Save