mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 19:38:06 -04:00
add config key and input binding to disable vertical mouse movement (#430)
This commit is contained in:
parent
db6e211bc6
commit
4fc2603252
@ -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
|
||||
|
@ -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
|
||||
|
@ -39,6 +39,7 @@ enum
|
||||
input_speed,
|
||||
input_strafe,
|
||||
input_autorun,
|
||||
input_novert,
|
||||
input_reverse,
|
||||
input_use,
|
||||
input_fire,
|
||||
|
@ -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 ();
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user