engine: client: synchronize sv_cheats state with the server

This commit is contained in:
Alibek Omarov
2025-09-28 22:31:46 +05:00
parent 8b65cd73fc
commit 69204aec07
4 changed files with 42 additions and 24 deletions

View File

@@ -31,15 +31,8 @@ static void CL_ParseExtraInfo( sizebuf_t *msg )
if( COM_CheckStringEmpty( clientfallback ))
Con_Reportf( S_ERROR "%s: TODO: add fallback directory %s!\n", __func__, clientfallback );
if( MSG_ReadByte( msg ))
{
Cvar_FullSet( "sv_cheats", "1", FCVAR_READ_ONLY | FCVAR_SERVER );
}
else
{
Cvar_SetCheatState();
Cvar_FullSet( "sv_cheats", "0", FCVAR_READ_ONLY | FCVAR_SERVER );
}
cls.allow_cheats = MSG_ReadByte( msg ) ? true : false;
CL_SetCheatState( cl.maxclients > 1, cls.allow_cheats );
}
static void CL_ParseNewMovevars( sizebuf_t *msg )