diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-08-09 12:19:27 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 23:26:58 +0000 |
commit | 41dbd48f721f3489e4ca162fc14484d13c57d53c (patch) | |
tree | 3ef4b676ea728b6c4ade154cab119aafc3a9c002 | |
parent | 6a2c93fd6d504d69015415ae9e3a6b1d5d36b372 (diff) |
Add hack to allow server the setting of game cvar values that are important for playerstate prediction for legacy gamecode.
-rw-r--r-- | src/client/cl_parse.c | 10 | ||||
-rw-r--r-- | src/qcommon/cvar.c | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/client/cl_parse.c b/src/client/cl_parse.c index 5218d0b3..e8bb6011 100644 --- a/src/client/cl_parse.c +++ b/src/client/cl_parse.c @@ -408,8 +408,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/src/qcommon/cvar.c b/src/qcommon/cvar.c index f4aaf60c..0954e1f6 100644 --- a/src/qcommon/cvar.c +++ b/src/qcommon/cvar.c @@ -630,7 +630,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 " |