diff --git a/Source/g_game.c b/Source/g_game.c index 8810e4c5..e41455d6 100644 --- a/Source/g_game.c +++ b/Source/g_game.c @@ -122,6 +122,7 @@ wbstartstruct_t wminfo; // parms for world map / intermission boolean haswolflevels = false;// jff 4/18/98 wolf levels present byte *savebuffer; int autorun = false; // always running? // phares +int novert = false; int default_complevel; @@ -470,7 +471,10 @@ void G_BuildTiccmd(ticcmd_t* cmd) cmd->buttons |= BT_USE; } + if (!novert) + { forward += mousey; + } if (strafe) side += mousex*2; else diff --git a/Source/g_game.h b/Source/g_game.h index 39cea728..0aa345ee 100644 --- a/Source/g_game.h +++ b/Source/g_game.h @@ -79,6 +79,7 @@ extern int key_escape; extern int key_enter; extern int key_help; extern int autorun; // always running? // phares +extern int novert; extern int defaultskill; //jff 3/24/98 default skill extern boolean haswolflevels; //jff 4/18/98 wolf levels present diff --git a/Source/m_input.h b/Source/m_input.h index 00277b61..adf4b5e8 100644 --- a/Source/m_input.h +++ b/Source/m_input.h @@ -39,6 +39,7 @@ enum input_speed, input_strafe, input_autorun, + input_novert, input_reverse, input_use, input_fire, diff --git a/Source/m_menu.c b/Source/m_menu.c index 74655ccd..08e5dd63 100644 --- a/Source/m_menu.c +++ b/Source/m_menu.c @@ -2718,10 +2718,11 @@ setup_menu_t keys_settings1[] = // Key Binding screen strings {"RUN" ,S_INPUT ,m_scrn,KB_X,KB_Y+8*8,{0},input_speed}, {"STRAFE" ,S_INPUT ,m_scrn,KB_X,KB_Y+9*8,{0},input_strafe}, {"AUTORUN" ,S_INPUT ,m_scrn,KB_X,KB_Y+10*8,{0},input_autorun}, + {"VERTICAL MOUSE",S_INPUT ,m_scrn,KB_X,KB_Y+11*8,{0},input_novert}, - {"TURN LEFT" ,S_INPUT ,m_scrn,KB_X,KB_Y+12*8,{0},input_turnleft}, - {"TURN RIGHT" ,S_INPUT ,m_scrn,KB_X,KB_Y+13*8,{0},input_turnright}, - {"180 TURN" ,S_INPUT ,m_scrn,KB_X,KB_Y+14*8,{0},input_reverse}, + {"TURN LEFT" ,S_INPUT ,m_scrn,KB_X,KB_Y+13*8,{0},input_turnleft}, + {"TURN RIGHT" ,S_INPUT ,m_scrn,KB_X,KB_Y+14*8,{0},input_turnright}, + {"180 TURN" ,S_INPUT ,m_scrn,KB_X,KB_Y+15*8,{0},input_reverse}, // Button for resetting to defaults {0,S_RESET,m_null,X_BUTTON,Y_BUTTON}, @@ -4831,6 +4832,13 @@ boolean M_Responder (event_t* ev) return true; } + if (M_InputActivated(input_novert)) + { + novert = !novert; + dprintf("Vertical Mouse %s", !novert ? "On" : "Off"); + return true; + } + if (ch == key_help) // Help key { M_StartControlPanel (); diff --git a/Source/m_misc.c b/Source/m_misc.c index 550bd0db..b41bd7d9 100644 --- a/Source/m_misc.c +++ b/Source/m_misc.c @@ -426,6 +426,13 @@ default_t defaults[] = { "1 to enable autorun" }, + { + "novert", + (config_t *) &novert, NULL, + {0}, {0,1}, number, ss_none, wad_no, + "1 to disable vertical mouse movement" + }, + { // killough 2/21/98: default to 10 "screenblocks", (config_t *) &screenblocks, NULL, @@ -935,6 +942,14 @@ default_t defaults[] = { {input_type_joyb, CONTROLLER_LEFT_STICK} } }, + { + "input_novert", + NULL, NULL, + {0}, {UL,UL}, input, ss_keys, wad_no, + "key to toggle vertical mouse movement", + input_novert, { {0, 0} } + }, + { "input_chat", NULL, NULL,