diff options
Diffstat (limited to 'code/client/cl_main.c')
-rw-r--r-- | code/client/cl_main.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/code/client/cl_main.c b/code/client/cl_main.c index 146c234..488c531 100644 --- a/code/client/cl_main.c +++ b/code/client/cl_main.c @@ -652,7 +652,7 @@ Closing the main menu will restart the demo loop void CL_StartDemoLoop( void ) { // start the demo loop again Cbuf_AddText ("d1\n"); - cls.keyCatchers = 0; + Key_SetCatcher( 0 ); } /* @@ -751,7 +751,7 @@ memory on the hunk from cgame, ui, and renderer void CL_MapLoading( void ) { if ( com_dedicated->integer ) { cls.state = CA_DISCONNECTED; - cls.keyCatchers = KEYCATCH_CONSOLE; + Key_SetCatcher( KEYCATCH_CONSOLE ); return; } @@ -760,7 +760,7 @@ void CL_MapLoading( void ) { } Con_Close(); - cls.keyCatchers = 0; + Key_SetCatcher( 0 ); // if we are already connected to the local host, stay connected if ( cls.state >= CA_CONNECTED && !Q_stricmp( cls.servername, "localhost" ) ) { @@ -776,7 +776,7 @@ void CL_MapLoading( void ) { CL_Disconnect( qtrue ); Q_strncpyz( cls.servername, "localhost", sizeof(cls.servername) ); cls.state = CA_CHALLENGING; // so the connect screen is drawn - cls.keyCatchers = 0; + Key_SetCatcher( 0 ); SCR_UpdateScreen(); clc.connectTime = -RETRANSMIT_TIMEOUT; NET_StringToAdr( cls.servername, &clc.serverAddress); @@ -1205,7 +1205,7 @@ void CL_Connect_f( void ) { cls.state = CA_CONNECTING; } - cls.keyCatchers = 0; + Key_SetCatcher( 0 ); clc.connectTime = -99999; // CL_CheckForResend() will fire immediately clc.connectPacketCount = 0; @@ -2228,7 +2228,7 @@ void CL_Frame ( int msec ) { // bring up the cd error dialog if needed cls.cddialog = qfalse; VM_Call( uivm, UI_SET_ACTIVE_MENU, UIMENU_NEED_CD ); - } else if ( cls.state == CA_DISCONNECTED && !( cls.keyCatchers & KEYCATCH_UI ) + } else if ( cls.state == CA_DISCONNECTED && !( Key_GetCatcher( ) & KEYCATCH_UI ) && !com_sv_running->integer ) { // if disconnected, bring up the menu S_StopAllSounds(); @@ -2857,6 +2857,7 @@ void CL_Shutdown( void ) { recursive = qfalse; Com_Memset( &cls, 0, sizeof( cls ) ); + Key_SetCatcher( 0 ); Com_Printf( "-----------------------\n" ); |