Allow any key to abort network connection, ignore non-keyboard keys in chat

This commit is contained in:
wolfy852 2019-01-13 19:22:54 -06:00
parent 31ccae60c9
commit dead0475ce
2 changed files with 4 additions and 4 deletions

View file

@ -2076,8 +2076,8 @@ static boolean CL_ServerConnectionTicker(boolean viams, const char *tmpsave, tic
I_OsPolling(); I_OsPolling();
key = I_GetKey(); key = I_GetKey();
// For some reason, gamekeydown[gamecontrol[gc_brake][0]] is always true here, so we're just going to check the second to fourth buttons. // Any key can be used to abort network connection
if (key == KEY_ESCAPE || key == KEY_JOY1+1 || key == KEY_JOY1+2 || key == KEY_JOY1+3) if (key != KEY_NULL)
{ {
CONS_Printf(M_GetText("Network game synchronization aborted.\n")); CONS_Printf(M_GetText("Network game synchronization aborted.\n"));
// M_StartMessage(M_GetText("Network game synchronization aborted.\n\nPress ESC\n"), NULL, MM_NOTHING); // M_StartMessage(M_GetText("Network game synchronization aborted.\n\nPress ESC\n"), NULL, MM_NOTHING);

View file

@ -1184,8 +1184,8 @@ boolean HU_Responder(event_t *ev)
|| ev->data1 == KEY_LALT || ev->data1 == KEY_RALT) || ev->data1 == KEY_LALT || ev->data1 == KEY_RALT)
return true; return true;
// Ignore joystick hats, except when the talk key is bound // Ignore non-keyboard keys, except when the talk key is bound
if (ev->data1 >= KEY_HAT1 && ev->data1 <= KEY_HAT1+3 if (ev->data1 >= KEY_MOUSE1
&& (ev->data1 != gamecontrol[gc_talkkey][0] && (ev->data1 != gamecontrol[gc_talkkey][0]
&& ev->data1 != gamecontrol[gc_talkkey][1])) && ev->data1 != gamecontrol[gc_talkkey][1]))
return false; return false;