From 3b642f90327dbbebec61ac8f587a2244fc0e4f80 Mon Sep 17 00:00:00 2001 From: Thilo Schulz Date: Tue, 9 Aug 2011 12:19:27 +0000 Subject: [PATCH] Add hack to allow server the setting of game cvar values that are important for playerstate prediction for legacy gamecode. --- code/client/cl_parse.c | 10 ++++++++-- code/qcommon/cvar.c | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/code/client/cl_parse.c b/code/client/cl_parse.c index da982034..e269be35 100644 --- a/code/client/cl_parse.c +++ b/code/client/cl_parse.c @@ -417,8 +417,14 @@ void CL_SystemInfoChanged( void ) { // If this cvar may not be modified by a server discard the value. if(!(cvar_flags & (CVAR_SYSTEMINFO | CVAR_SERVER_CREATED | CVAR_USER_CREATED))) { - Com_Printf(S_COLOR_YELLOW "WARNING: server is not allowed to set %s=%s\n", key, value); - continue; +#ifndef STANDALONE + if(Q_stricmp(key, "g_synchronousClients") && Q_stricmp(key, "pmove_fixed") && + Q_stricmp(key, "pmove_msec")) +#endif + { + Com_Printf(S_COLOR_YELLOW "WARNING: server is not allowed to set %s=%s\n", key, value); + continue; + } } Cvar_SetSafe(key, value); diff --git a/code/qcommon/cvar.c b/code/qcommon/cvar.c index 68f25070..6a090d68 100644 --- a/code/qcommon/cvar.c +++ b/code/qcommon/cvar.c @@ -629,7 +629,7 @@ void Cvar_SetSafe( const char *var_name, const char *value ) { int flags = Cvar_Flags( var_name ); - if( flags != CVAR_NONEXISTENT && flags & CVAR_PROTECTED ) + if((flags != CVAR_NONEXISTENT) && (flags & CVAR_PROTECTED)) { if( value ) Com_Error( ERR_DROP, "Restricted source tried to set "