diff --git a/src/d_clisrv.c b/src/d_clisrv.c index ed864425..eafc1283 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -25,6 +25,7 @@ #include "g_game.h" #include "hu_stuff.h" #include "keys.h" +#include "g_input.h" // JOY1 #include "m_menu.h" #include "console.h" #include "d_netfil.h" @@ -2073,7 +2074,7 @@ static boolean CL_ServerConnectionTicker(boolean viams, const char *tmpsave, tic I_OsPolling(); key = I_GetKey(); - if (key == KEY_ESCAPE) + if (key == KEY_ESCAPE || key == KEY_JOY1+1) { CONS_Printf(M_GetText("Network game synchronization aborted.\n")); // M_StartMessage(M_GetText("Network game synchronization aborted.\n\nPress ESC\n"), NULL, MM_NOTHING); diff --git a/src/g_game.c b/src/g_game.c index 64b76363..7741f083 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1800,7 +1800,7 @@ boolean G_Responder(event_t *ev) { // allow spy mode changes even during the demo if (gamestate == GS_LEVEL && ev->type == ev_keydown - && (ev->data1 == gamecontrol[gc_viewpoint][0] || ev->data1 == gamecontrol[gc_viewpoint][1])) + && (ev->data1 == KEY_F12 || ev->data1 == gamecontrol[gc_viewpoint][0] || ev->data1 == gamecontrol[gc_viewpoint][1])) { if (splitscreen || !netgame) displayplayer = consoleplayer; diff --git a/src/locale/en.po b/src/locale/en.po index 2665082a..ce451080 100644 --- a/src/locale/en.po +++ b/src/locale/en.po @@ -3629,7 +3629,7 @@ msgid "another castle!" msgstr "" #: st_stuff.c:2328 st_stuff.c:2334 st_stuff.c:2356 -msgid "Press F12 to watch another player." +msgid "Press Viewpoint Key to watch a player." msgstr "" #: st_stuff.c:2333 diff --git a/src/locale/srb2.pot b/src/locale/srb2.pot index 37d14f8b..c61cbcc9 100644 --- a/src/locale/srb2.pot +++ b/src/locale/srb2.pot @@ -3820,7 +3820,7 @@ msgid "another castle!" msgstr "" #: st_stuff.c:2092 st_stuff.c:2098 st_stuff.c:2120 -msgid "Press F12 to watch another player." +msgid "Press Viewpoint Key to watch a player." msgstr "" #: st_stuff.c:2097 diff --git a/src/m_menu.c b/src/m_menu.c index a79bf904..034c100a 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2461,42 +2461,44 @@ boolean M_Responder(event_t *ev) // (but still allow shift keyup so caps doesn't get stuck) return false; } - else if (ev->type == ev_keydown) - { - ch = ev->data1; - - // added 5-2-98 remap virtual keys (mouse & joystick buttons) - switch (ch) - { - case KEY_MOUSE1: - case KEY_JOY1: - case KEY_JOY1 + 2: - ch = KEY_ENTER; - break; - case KEY_JOY1 + 3: - ch = 'n'; - break; - case KEY_MOUSE1 + 1: - case KEY_JOY1 + 1: - ch = KEY_BACKSPACE; - break; - case KEY_HAT1: - ch = KEY_UPARROW; - break; - case KEY_HAT1 + 1: - ch = KEY_DOWNARROW; - break; - case KEY_HAT1 + 2: - ch = KEY_LEFTARROW; - break; - case KEY_HAT1 + 3: - ch = KEY_RIGHTARROW; - break; - } - } else if (menuactive) { - if (ev->type == ev_joystick && ev->data1 == 0 && joywait < I_GetTime()) + if (ev->type == ev_keydown) + { + ch = ev->data1; + + // added 5-2-98 remap virtual keys (mouse & joystick buttons) + switch (ch) + { + case KEY_MOUSE1: + case KEY_JOY1: + ch = KEY_ENTER; + break; + case KEY_JOY1 + 3: + ch = 'n'; + break; + case KEY_MOUSE1 + 1: + case KEY_JOY1 + 1: + ch = KEY_ESCAPE; + break; + case KEY_JOY1 + 2: + ch = KEY_BACKSPACE; + break; + case KEY_HAT1: + ch = KEY_UPARROW; + break; + case KEY_HAT1 + 1: + ch = KEY_DOWNARROW; + break; + case KEY_HAT1 + 2: + ch = KEY_LEFTARROW; + break; + case KEY_HAT1 + 3: + ch = KEY_RIGHTARROW; + break; + } + } + else if (ev->type == ev_joystick && ev->data1 == 0 && joywait < I_GetTime()) { const INT32 jdeadzone = JOYAXISRANGE/4; if (ev->data3 != INT32_MAX) @@ -2570,6 +2572,8 @@ boolean M_Responder(event_t *ev) } } } + else if (ev->type == ev_keydown) // Preserve event for other responders + ch = ev->data1; if (ch == -1) return false; diff --git a/src/m_misc.c b/src/m_misc.c index 603e3de0..003bf925 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -1499,9 +1499,9 @@ boolean M_ScreenshotResponder(event_t *ev) if (ch >= KEY_MOUSE1 && menuactive) // If it's not a keyboard key, then don't allow it in the menus! return false; - if (ch == gamecontrol[gc_screenshot][0] || ch == gamecontrol[gc_screenshot][1]) // remappable F8 + if (ch == KEY_F8 || ch == gamecontrol[gc_screenshot][0] || ch == gamecontrol[gc_screenshot][1]) // remappable F8 M_ScreenShot(); - else if (ch == gamecontrol[gc_recordgif][0] || ch == gamecontrol[gc_recordgif][1]) // remappable F9 + else if (ch == KEY_F9 || ch == gamecontrol[gc_recordgif][0] || ch == gamecontrol[gc_recordgif][1]) // remappable F9 ((moviemode) ? M_StopMovie : M_StartMovie)(); else return false; diff --git a/src/st_stuff.c b/src/st_stuff.c index 770321da..a3429690 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -1931,12 +1931,12 @@ static void ST_overlayDrawer(void) if (!hu_showscores && netgame && !mapreset) { /*if (G_GametypeUsesLives() && stplyr->lives <= 0 && countdown != 1) - V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press F12 to watch another player.")); + V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press Viewpoint Key to watch a player.")); else if (gametype == GT_HIDEANDSEEK && (!stplyr->spectator && !(stplyr->pflags & PF_TAGIT)) && (leveltime > hidetime * TICRATE)) { V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(116), 0, M_GetText("You cannot move while hiding.")); - V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press F12 to watch another player.")); + V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), 0, M_GetText("Press Viewpoint Key to watch a player.")); } else if (!G_RaceGametype() && stplyr->playerstate == PST_DEAD && stplyr->lives) //Death overrides spectator text. {