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).
This commit is contained in:
Agent Agrimar 2020-09-13 09:10:06 -04:00 committed by Alibek Omarov
parent 23ea7ecbcc
commit e4a71afe63

View File

@ -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 )
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 ();