Refactor handling of escape input a little

- Includes port of KartKrew/Kart-Public!250
This commit is contained in:
toaster 2022-09-13 19:56:48 +01:00
parent 921b667c3e
commit 7f2d28ea33

View file

@ -1923,13 +1923,18 @@ static boolean CL_ServerConnectionTicker(const char *tmpsave, tic_t *oldtic, tic
{ {
D_ProcessEvents(); //needed for menu system to receive inputs D_ProcessEvents(); //needed for menu system to receive inputs
} }
else else if (netgame)
{ {
for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1)) for (; eventtail != eventhead; eventtail = (eventtail+1) & (MAXEVENTS-1))
G_MapEventsToControls(&events[eventtail]); G_MapEventsToControls(&events[eventtail]);
if (G_PlayerInputDown(0, gc_b, 1)
|| G_PlayerInputDown(0, gc_x, 1)
|| gamekeydown[0][KEY_ESCAPE])
cl_mode = CL_ABORTED;
} }
if (G_PlayerInputDown(0, gc_b, 1) || G_PlayerInputDown(0, gc_x, 1) || gamekeydown[0][KEY_ESCAPE] || cl_mode == CL_ABORTED) if (cl_mode == CL_ABORTED)
{ {
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 (B)\n"), NULL, MM_NOTHING); // M_StartMessage(M_GetText("Network game synchronization aborted.\n\nPress (B)\n"), NULL, MM_NOTHING);