aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-04-05 15:26:15 +0000
committertjw <tjw@edf5b092-35ff-0310-97b2-ce42778d08ea>2007-04-05 15:26:15 +0000
commit8ee936737482bb8f057af11c8254ae8148ae9bb7 (patch)
tree3e986438e3d6635f0fa2c232b4495eb1fe963d91
parent26b82737ed2fbd600b7f19fcdc402bc9de1de17c (diff)
downloadioquake3-aero-8ee936737482bb8f057af11c8254ae8148ae9bb7.tar.gz
ioquake3-aero-8ee936737482bb8f057af11c8254ae8148ae9bb7.zip
* (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 git-svn-id: svn://svn.icculus.org/quake3/trunk@1062 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/client/cl_cgame.c2
-rw-r--r--code/client/cl_main.c3
-rw-r--r--code/client/cl_ui.c2
-rw-r--r--code/server/sv_init.c3
4 files changed, 6 insertions, 4 deletions
diff --git a/code/client/cl_cgame.c b/code/client/cl_cgame.c
index d767b8a..810f738 100644
--- a/code/client/cl_cgame.c
+++ b/code/client/cl_cgame.c
@@ -747,7 +747,7 @@ void CL_InitCGame( void ) {
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
diff --git a/code/client/cl_main.c b/code/client/cl_main.c
index cfb1313..ee538e0 100644
--- a/code/client/cl_main.c
+++ b/code/client/cl_main.c
@@ -508,7 +508,8 @@ void CL_PlayDemo_f( void ) {
}
// 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 );
diff --git a/code/client/cl_ui.c b/code/client/cl_ui.c
index 9345647..572e14a 100644
--- a/code/client/cl_ui.c
+++ b/code/client/cl_ui.c
@@ -1173,7 +1173,7 @@ void CL_InitUI( void ) {
}
// reset any CVAR_CHEAT cvars registered by ui
- if ( !cl_connectedToCheatServer )
+ if ( !clc.demoplaying && !cl_connectedToCheatServer )
Cvar_SetCheatState();
}
diff --git a/code/server/sv_init.c b/code/server/sv_init.c
index c7c5087..d95672a 100644
--- a/code/server/sv_init.c
+++ b/code/server/sv_init.c
@@ -747,6 +747,7 @@ void SV_Shutdown( char *finalmsg ) {
Com_Printf( "---------------------------\n" );
// disconnect any local clients
- CL_Disconnect( qfalse );
+ if( sv_killserver->integer != 2 )
+ CL_Disconnect( qfalse );
}