summaryrefslogtreecommitdiff
path: root/src/client/cl_main.c
diff options
context:
space:
mode:
author/dev/humancontroller <devhc@example.com>2014-07-12 23:07:02 +0200
committer/dev/humancontroller <devhc@example.com>2017-03-09 13:51:07 +0100
commit0dfd0b1df9633d0f6378cc5096b7e8114d009a28 (patch)
treefa734d7adcf06c4cef91936b2b9f4cc98bdc903d /src/client/cl_main.c
parent3c08da6086d5c2431dd929543ed89afb79956423 (diff)
do not close the console "from time to time"
alter a bunch of cases where Key_SetCatcher() turns off the KEYCATCH_CONSOLE flag. remove all uses of Con_Close() and the function itself altogether. the console is now only togglable by a console key or with the toggleconsole command.
Diffstat (limited to 'src/client/cl_main.c')
-rw-r--r--src/client/cl_main.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/client/cl_main.c b/src/client/cl_main.c
index 00dc6640..203e90d5 100644
--- a/src/client/cl_main.c
+++ b/src/client/cl_main.c
@@ -1094,8 +1094,6 @@ void CL_PlayDemo_f( void ) {
}
Q_strncpyz( clc.demoName, arg, sizeof( clc.demoName ) );
- Con_Close();
-
clc.state = CA_CONNECTED;
clc.demoplaying = qtrue;
Q_strncpyz( clc.servername, arg, sizeof( clc.servername ) );
@@ -1120,7 +1118,7 @@ Closing the main menu will restart the demo loop
void CL_StartDemoLoop( void ) {
// start the demo loop again
Cbuf_AddText ("d1\n");
- Key_SetCatcher( 0 );
+ Key_SetCatcher( Key_GetCatcher() & KEYCATCH_CONSOLE );
}
/*
@@ -1291,8 +1289,7 @@ void CL_MapLoading( void ) {
return;
}
- Con_Close();
- Key_SetCatcher( 0 );
+ Key_SetCatcher( Key_GetCatcher() & KEYCATCH_CONSOLE );
// if we are already connected to the local host, stay connected
if ( clc.state >= CA_CONNECTED && !Q_stricmp( clc.servername, "localhost" ) ) {
@@ -1306,7 +1303,7 @@ void CL_MapLoading( void ) {
CL_Disconnect( qtrue );
Q_strncpyz( clc.servername, "localhost", sizeof(clc.servername) );
clc.state = CA_CHALLENGING; // so the connect screen is drawn
- Key_SetCatcher( 0 );
+ Key_SetCatcher( Key_GetCatcher() & KEYCATCH_CONSOLE );
SCR_UpdateScreen();
clc.connectTime = -RETRANSMIT_TIMEOUT;
NET_StringToAdr( clc.servername, &clc.serverAddress, NA_UNSPEC);
@@ -1651,7 +1648,6 @@ void CL_Connect_f( void ) {
noGameRestart = qtrue;
CL_Disconnect( qtrue );
- Con_Close();
Q_strncpyz( clc.servername, server, sizeof(clc.servername) );
@@ -1685,7 +1681,7 @@ void CL_Connect_f( void ) {
clc.challenge = ((rand() << 16) ^ rand()) ^ Com_Milliseconds();
}
- Key_SetCatcher( 0 );
+ Key_SetCatcher( Key_GetCatcher() & KEYCATCH_CONSOLE );
clc.connectTime = -99999; // CL_CheckForResend() will fire immediately
clc.connectPacketCount = 0;