mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-25 22:34:24 +00:00
engine: client: cl_parse_48: add a temporary hack to avoid the lag issues after changelevel on legacy servers
This commit is contained in:
parent
013bfe5c34
commit
00765f1ff2
@ -373,6 +373,8 @@ void CL_ParseLegacyServerMessage( sizebuf_t *msg, qboolean normal_message )
|
|||||||
old_background = cl.background;
|
old_background = cl.background;
|
||||||
if( MSG_ReadOneBit( msg ))
|
if( MSG_ReadOneBit( msg ))
|
||||||
{
|
{
|
||||||
|
int old_maxplayers = cl.maxclients;
|
||||||
|
|
||||||
cls.changelevel = true;
|
cls.changelevel = true;
|
||||||
S_StopAllSounds( true );
|
S_StopAllSounds( true );
|
||||||
|
|
||||||
@ -385,6 +387,13 @@ void CL_ParseLegacyServerMessage( sizebuf_t *msg, qboolean normal_message )
|
|||||||
}
|
}
|
||||||
|
|
||||||
CL_ClearState ();
|
CL_ClearState ();
|
||||||
|
|
||||||
|
// a1ba: need to restore cl.maxclients because engine chooses
|
||||||
|
// frame backups count depending on this value
|
||||||
|
// In general, it's incorrect to call CL_InitEdicts right after
|
||||||
|
// CL_ClearState because of this bug. Some time later this logic
|
||||||
|
// should be re-done.
|
||||||
|
cl.maxclients = old_maxplayers;
|
||||||
CL_InitEdicts (); // re-arrange edicts
|
CL_InitEdicts (); // re-arrange edicts
|
||||||
}
|
}
|
||||||
else Con_Printf( "Server disconnected, reconnecting\n" );
|
else Con_Printf( "Server disconnected, reconnecting\n" );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user