mirror of
https://github.com/ioquake/ioq3.git
synced 2025-05-30 16:41:31 +00:00
* Fix bug that prevented key up events getting to cgame/ui when not in game
* Use Key_[GS]etCatcher everywhere to set keycatcher * Clear all key states when the catcher changes
This commit is contained in:
parent
26641226a4
commit
5692e30fa9
9 changed files with 79 additions and 71 deletions
|
@ -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" );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue