diff options
author | Thilo Schulz <arny@ats.s.bawue.de> | 2011-06-21 11:18:35 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 21:47:33 +0000 |
commit | 555eaebb1b7cb7c4a5e1036892b0effbd62766ae (patch) | |
tree | 1038802c3629c85c47a62a5013f2a7271d485bec /src/client/cl_console.c | |
parent | e09392335162f87cd16257506e600268c2cd8ec9 (diff) |
- Improve game_restart: * differing screen resolutions and network settings are now honoured when changing fs_game * Fix hunk memory leak on game_restart * Move cls.state and cls.servername to clc so connection state is fully preserved over game_restart * Revert back to previous fs_game after disconnecting from a server that triggered a game_restart * Fix error dialog popping up after every game_restart if an error happened previously (reported by Ensiform) - Fixed that not all commands added by CL_Init() would be removed by CL_Shutdown()
Diffstat (limited to 'src/client/cl_console.c')
-rw-r--r-- | src/client/cl_console.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/src/client/cl_console.c b/src/client/cl_console.c index c7d01bc7..6cb80980 100644 --- a/src/client/cl_console.c +++ b/src/client/cl_console.c @@ -70,7 +70,7 @@ Con_ToggleConsole_f */ void Con_ToggleConsole_f (void) { // Can't toggle the console when it's the only thing available - if ( cls.state == CA_DISCONNECTED && Key_GetCatcher( ) == KEYCATCH_CONSOLE ) { + if ( clc.state == CA_DISCONNECTED && Key_GetCatcher( ) == KEYCATCH_CONSOLE ) { return; } @@ -269,6 +269,21 @@ void Con_Init (void) { Cmd_SetCommandCompletionFunc( "condump", Cmd_CompleteTxtName ); } +/* +================ +Con_Shutdown +================ +*/ +void Con_Shutdown(void) +{ + Cmd_RemoveCommand("toggleconsole"); + Cmd_RemoveCommand("messagemode"); + Cmd_RemoveCommand("messagemode2"); + Cmd_RemoveCommand("messagemode3"); + Cmd_RemoveCommand("messagemode4"); + Cmd_RemoveCommand("clear"); + Cmd_RemoveCommand("condump"); +} /* =============== @@ -400,7 +415,7 @@ Draw the editline after a ] prompt void Con_DrawInput (void) { int y; - if ( cls.state != CA_DISCONNECTED && !(Key_GetCatcher( ) & KEYCATCH_CONSOLE ) ) { + if ( clc.state != CA_DISCONNECTED && !(Key_GetCatcher( ) & KEYCATCH_CONSOLE ) ) { return; } @@ -538,7 +553,7 @@ void Con_DrawConsole( void ) { Con_CheckResize (); // if disconnected, render console full screen - if ( cls.state == CA_DISCONNECTED ) { + if ( clc.state == CA_DISCONNECTED ) { if ( !( Key_GetCatcher( ) & (KEYCATCH_UI | KEYCATCH_CGAME)) ) { Con_DrawSolidConsole( 1.0 ); return; |