Revert "Enable d-pad on the vote screen"

Partial revert of commit 92a60b32de.
This commit is contained in:
wolfy852 2019-01-12 05:37:07 -06:00
parent 622509682a
commit 31ccae60c9
3 changed files with 2 additions and 23 deletions

View file

@ -1180,26 +1180,6 @@ boolean InputDown(INT32 gc, UINT8 p)
}
}
// Returns true if the hat is pressed for the specified player
// 0 is up, 1 is down, 2 is left, 3 is right
// Basically a hack needed to allow the d-pad on the vote screen.
boolean HatDown(UINT8 dir, UINT8 p)
{
if (p == 1 && gamekeydown[KEY_HAT1 + dir])
return true;
if (p == 2 && gamekeydown[KEY_2HAT1 + dir])
return true;
if (p == 3 && gamekeydown[KEY_3HAT1 + dir])
return true;
if (p == 4 && gamekeydown[KEY_4HAT1 + dir])
return true;
return false;
}
INT32 JoyAxis(axis_input_e axissel, UINT8 p)
{
switch (p)

View file

@ -100,7 +100,6 @@ INT16 G_ClipAimingPitch(INT32 *aiming);
INT16 G_SoftwareClipAimingPitch(INT32 *aiming);
boolean InputDown(INT32 gc, UINT8 p);
boolean HatDown(UINT8 dir, UINT8 p);
INT32 JoyAxis(axis_input_e axissel, UINT8 p);
extern angle_t localangle, localangle2, localangle3, localangle4;

View file

@ -1318,13 +1318,13 @@ void Y_VoteTicker(void)
&& !voteclient.playerinfo[i].delay
&& pickedvote == -1 && votes[p] == -1)
{
if (InputDown(gc_aimforward, i+1) || JoyAxis(AXISAIM, i+1) < 0 || HatDown(0, i+1))
if (InputDown(gc_aimforward, i+1) || JoyAxis(AXISAIM, i+1) < 0)
{
voteclient.playerinfo[i].selection--;
pressed = true;
}
if ((InputDown(gc_aimbackward, i+1) || JoyAxis(AXISAIM, i+1) > 0 || HatDown(1, i+1)) && !pressed)
if ((InputDown(gc_aimbackward, i+1) || JoyAxis(AXISAIM, i+1) > 0) && !pressed)
{
voteclient.playerinfo[i].selection++;
pressed = true;