mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-06 16:31:26 +00:00
Revert "Enable d-pad on the vote screen"
Partial revert of commit 92a60b32de
.
This commit is contained in:
parent
622509682a
commit
31ccae60c9
3 changed files with 2 additions and 23 deletions
20
src/g_game.c
20
src/g_game.c
|
@ -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)
|
INT32 JoyAxis(axis_input_e axissel, UINT8 p)
|
||||||
{
|
{
|
||||||
switch (p)
|
switch (p)
|
||||||
|
|
|
@ -100,7 +100,6 @@ INT16 G_ClipAimingPitch(INT32 *aiming);
|
||||||
INT16 G_SoftwareClipAimingPitch(INT32 *aiming);
|
INT16 G_SoftwareClipAimingPitch(INT32 *aiming);
|
||||||
|
|
||||||
boolean InputDown(INT32 gc, UINT8 p);
|
boolean InputDown(INT32 gc, UINT8 p);
|
||||||
boolean HatDown(UINT8 dir, UINT8 p);
|
|
||||||
INT32 JoyAxis(axis_input_e axissel, UINT8 p);
|
INT32 JoyAxis(axis_input_e axissel, UINT8 p);
|
||||||
|
|
||||||
extern angle_t localangle, localangle2, localangle3, localangle4;
|
extern angle_t localangle, localangle2, localangle3, localangle4;
|
||||||
|
|
|
@ -1318,13 +1318,13 @@ void Y_VoteTicker(void)
|
||||||
&& !voteclient.playerinfo[i].delay
|
&& !voteclient.playerinfo[i].delay
|
||||||
&& pickedvote == -1 && votes[p] == -1)
|
&& 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--;
|
voteclient.playerinfo[i].selection--;
|
||||||
pressed = true;
|
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++;
|
voteclient.playerinfo[i].selection++;
|
||||||
pressed = true;
|
pressed = true;
|
||||||
|
|
Loading…
Reference in a new issue