Browse Source

engine: client: update the ref state before R_NewMap is called

This fixes fades that occur at the beginning of a map being a tad screwy as a result of the ref state not being updated with fresh values, which only happens when a frame is being rendered (loading happens to prevent that).
pull/2/head
Agent Agrimar 4 years ago committed by Alibek Omarov
parent
commit
e4a71afe63
  1. 12
      engine/client/cl_parse.c

12
engine/client/cl_parse.c

@ -1578,6 +1578,12 @@ void CL_RegisterResources( sizebuf_t *msg ) @@ -1578,6 +1578,12 @@ void CL_RegisterResources( sizebuf_t *msg )
CL_ClearWorld ();
// update the ref state.
refState.time = cl.time;
refState.oldtime = cl.oldtime;
refState.realtime = host.realtime;
refState.frametime = host.frametime;
// tell rendering system we have a new set of models.
ref.dllFuncs.R_NewMap ();
@ -3168,6 +3174,12 @@ void CL_LegacyPrecache_f( void ) @@ -3168,6 +3174,12 @@ void CL_LegacyPrecache_f( void )
if( clgame.entities )
clgame.entities->model = cl.worldmodel;
// update the ref state.
refState.time = cl.time;
refState.oldtime = cl.oldtime;
refState.realtime = host.realtime;
refState.frametime = host.frametime;
// tell rendering system we have a new set of models.
ref.dllFuncs.R_NewMap ();

Loading…
Cancel
Save