aboutsummaryrefslogtreecommitdiffstats
path: root/code/client
diff options
context:
space:
mode:
Diffstat (limited to 'code/client')
-rw-r--r--code/client/cl_cgame.c2
-rw-r--r--code/client/cl_main.c3
-rw-r--r--code/client/cl_ui.c2
3 files changed, 4 insertions, 3 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();
}