[quake3-commits] r2140 - in trunk/code: client qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Aug 9 08:19:27 EDT 2011


Author: thilo
Date: 2011-08-09 08:19:27 -0400 (Tue, 09 Aug 2011)
New Revision: 2140

Modified:
   trunk/code/client/cl_parse.c
   trunk/code/qcommon/cvar.c
Log:
Add hack to allow server the setting of game cvar values that are important for playerstate prediction for legacy gamecode.


Modified: trunk/code/client/cl_parse.c
===================================================================
--- trunk/code/client/cl_parse.c	2011-08-05 21:45:22 UTC (rev 2139)
+++ trunk/code/client/cl_parse.c	2011-08-09 12:19:27 UTC (rev 2140)
@@ -417,8 +417,14 @@
 			// 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);

Modified: trunk/code/qcommon/cvar.c
===================================================================
--- trunk/code/qcommon/cvar.c	2011-08-05 21:45:22 UTC (rev 2139)
+++ trunk/code/qcommon/cvar.c	2011-08-09 12:19:27 UTC (rev 2140)
@@ -629,7 +629,7 @@
 {
 	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 "



More information about the quake3-commits mailing list