r1062 - in trunk/code: client server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Thu Apr 5 11:26:15 EDT 2007


Author: tjw
Date: 2007-04-05 11:26:15 -0400 (Thu, 05 Apr 2007)
New Revision: 1062

Modified:
   trunk/code/client/cl_cgame.c
   trunk/code/client/cl_main.c
   trunk/code/client/cl_ui.c
   trunk/code/server/sv_init.c
Log:
* (bug 3018) Should not reset CVAR_CHEAT cvars when loading cgame/ui if they
             are being loaded to play a demo.  This restores the normal
             "timedemo" cvar behaviour.
* (bug 3054) The "demo" command works properly now when connected to
             the local server


Modified: trunk/code/client/cl_cgame.c
===================================================================
--- trunk/code/client/cl_cgame.c	2007-04-04 02:54:40 UTC (rev 1061)
+++ trunk/code/client/cl_cgame.c	2007-04-05 15:26:15 UTC (rev 1062)
@@ -747,7 +747,7 @@
 	VM_Call( cgvm, CG_INIT, clc.serverMessageSequence, clc.lastExecutedServerCommand, clc.clientNum );
 
 	// reset any CVAR_CHEAT cvars registered by cgame
-	if ( !cl_connectedToCheatServer )
+	if ( !clc.demoplaying && !cl_connectedToCheatServer )
 		Cvar_SetCheatState();
 
 	// we will send a usercmd this frame, which

Modified: trunk/code/client/cl_main.c
===================================================================
--- trunk/code/client/cl_main.c	2007-04-04 02:54:40 UTC (rev 1061)
+++ trunk/code/client/cl_main.c	2007-04-05 15:26:15 UTC (rev 1062)
@@ -508,7 +508,8 @@
 	}
 
 	// make sure a local server is killed
-	Cvar_Set( "sv_killserver", "1" );
+	// 2 means don't force disconnect of local client
+	Cvar_Set( "sv_killserver", "2" );
 
 	CL_Disconnect( qtrue );
 

Modified: trunk/code/client/cl_ui.c
===================================================================
--- trunk/code/client/cl_ui.c	2007-04-04 02:54:40 UTC (rev 1061)
+++ trunk/code/client/cl_ui.c	2007-04-05 15:26:15 UTC (rev 1062)
@@ -1173,7 +1173,7 @@
 	}
 
 	// reset any CVAR_CHEAT cvars registered by ui
-	if ( !cl_connectedToCheatServer ) 
+	if ( !clc.demoplaying && !cl_connectedToCheatServer ) 
 		Cvar_SetCheatState();
 }
 

Modified: trunk/code/server/sv_init.c
===================================================================
--- trunk/code/server/sv_init.c	2007-04-04 02:54:40 UTC (rev 1061)
+++ trunk/code/server/sv_init.c	2007-04-05 15:26:15 UTC (rev 1062)
@@ -747,6 +747,7 @@
 	Com_Printf( "---------------------------\n" );
 
 	// disconnect any local clients
-	CL_Disconnect( qfalse );
+	if( sv_killserver->integer != 2 )
+		CL_Disconnect( qfalse );
 }
 




More information about the quake3-commits mailing list