From 0dfd0b1df9633d0f6378cc5096b7e8114d009a28 Mon Sep 17 00:00:00 2001 From: /dev/humancontroller Date: Sat, 12 Jul 2014 23:07:02 +0200 Subject: 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. --- src/client/cl_cgame.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/client/cl_cgame.c') diff --git a/src/client/cl_cgame.c b/src/client/cl_cgame.c index 23f3010c..9ce67455 100644 --- a/src/client/cl_cgame.c +++ b/src/client/cl_cgame.c @@ -619,10 +619,10 @@ intptr_t CL_CgameSystemCalls( intptr_t *args ) { return Key_IsDown( args[1] ); case CG_KEY_GETCATCHER: return Key_GetCatcher(); - case CG_KEY_SETCATCHER: - // Don't allow the cgame module to close the console - Key_SetCatcher( args[1] | ( Key_GetCatcher( ) & KEYCATCH_CONSOLE ) ); - return 0; + case CG_KEY_SETCATCHER: + // don't allow the cgame module to toggle the console + Key_SetCatcher( ( args[1] & ~KEYCATCH_CONSOLE ) | ( Key_GetCatcher() & KEYCATCH_CONSOLE ) ); + return 0; case CG_KEY_GETKEY: return Key_GetKey( VMA(1) ); @@ -755,9 +755,6 @@ void CL_InitCGame( void ) { t1 = Sys_Milliseconds(); - // put away the console - Con_Close(); - // find the current mapname info = cl.gameState.stringData + cl.gameState.stringOffsets[ CS_SERVERINFO ]; mapname = Info_ValueForKey( info, "mapname" ); -- cgit