mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: client: move ref state updating into standalone function
This commit is contained in:
parent
e4a71afe63
commit
80a5c53cb2
@ -1579,10 +1579,7 @@ void CL_RegisterResources( sizebuf_t *msg )
|
|||||||
CL_ClearWorld ();
|
CL_ClearWorld ();
|
||||||
|
|
||||||
// update the ref state.
|
// update the ref state.
|
||||||
refState.time = cl.time;
|
R_UpdateRefState ();
|
||||||
refState.oldtime = cl.oldtime;
|
|
||||||
refState.realtime = host.realtime;
|
|
||||||
refState.frametime = host.frametime;
|
|
||||||
|
|
||||||
// tell rendering system we have a new set of models.
|
// tell rendering system we have a new set of models.
|
||||||
ref.dllFuncs.R_NewMap ();
|
ref.dllFuncs.R_NewMap ();
|
||||||
@ -3175,10 +3172,7 @@ void CL_LegacyPrecache_f( void )
|
|||||||
clgame.entities->model = cl.worldmodel;
|
clgame.entities->model = cl.worldmodel;
|
||||||
|
|
||||||
// update the ref state.
|
// update the ref state.
|
||||||
refState.time = cl.time;
|
R_UpdateRefState ();
|
||||||
refState.oldtime = cl.oldtime;
|
|
||||||
refState.realtime = host.realtime;
|
|
||||||
refState.frametime = host.frametime;
|
|
||||||
|
|
||||||
// tell rendering system we have a new set of models.
|
// tell rendering system we have a new set of models.
|
||||||
ref.dllFuncs.R_NewMap ();
|
ref.dllFuncs.R_NewMap ();
|
||||||
|
@ -41,12 +41,17 @@ void GAME_EXPORT GL_FreeImage( const char *name )
|
|||||||
ref.dllFuncs.GL_FreeTexture( texnum );
|
ref.dllFuncs.GL_FreeTexture( texnum );
|
||||||
}
|
}
|
||||||
|
|
||||||
void GL_RenderFrame( const ref_viewpass_t *rvp )
|
void R_UpdateRefState( void )
|
||||||
{
|
{
|
||||||
refState.time = cl.time;
|
refState.time = cl.time;
|
||||||
refState.oldtime = cl.oldtime;
|
refState.oldtime = cl.oldtime;
|
||||||
refState.realtime = host.realtime;
|
refState.realtime = host.realtime;
|
||||||
refState.frametime = host.frametime;
|
refState.frametime = host.frametime;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GL_RenderFrame( const ref_viewpass_t *rvp )
|
||||||
|
{
|
||||||
|
R_UpdateRefState();
|
||||||
|
|
||||||
VectorCopy( rvp->vieworigin, refState.vieworg );
|
VectorCopy( rvp->vieworigin, refState.vieworg );
|
||||||
VectorCopy( rvp->viewangles, refState.viewangles );
|
VectorCopy( rvp->viewangles, refState.viewangles );
|
||||||
|
@ -51,5 +51,6 @@ extern convar_t *gl_clear;
|
|||||||
|
|
||||||
qboolean R_Init( void );
|
qboolean R_Init( void );
|
||||||
void R_Shutdown( void );
|
void R_Shutdown( void );
|
||||||
|
void R_UpdateRefState( void );
|
||||||
|
|
||||||
#endif // REF_COMMON_H
|
#endif // REF_COMMON_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user