mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Slight adjustments to cause less misclicks
This commit is contained in:
parent
38122e4fa5
commit
25342af17f
2 changed files with 9 additions and 6 deletions
|
|
@ -350,6 +350,7 @@ extern INT16 skullAnimCounter; // skull animation counter
|
|||
extern INT32 menuKey; // keyboard key pressed for menu
|
||||
|
||||
#define MENUDELAYTIME 7
|
||||
#define MENUMINDELAY 2
|
||||
|
||||
typedef enum
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1234,7 +1234,8 @@ static void M_UpdateMenuCMD(UINT8 i)
|
|||
if (menucmd[i].dpad_ud == 0 && menucmd[i].dpad_lr == 0 && menucmd[i].buttons == 0)
|
||||
{
|
||||
// Reset delay count with no buttons.
|
||||
menucmd[i].delay = menucmd[i].delayCount = 0;
|
||||
menucmd[i].delay = min(menucmd[i].delay, MENUMINDELAY);
|
||||
menucmd[i].delayCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2034,8 +2035,7 @@ static void M_HandlePressStart(setup_player_t *p, UINT8 num)
|
|||
|
||||
if (num != setup_numplayers)
|
||||
{
|
||||
// Only detect devices for the last player...
|
||||
// just too complicated otherwise.
|
||||
// Only detect devices for the last player.
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -2062,15 +2062,17 @@ static void M_HandlePressStart(setup_player_t *p, UINT8 num)
|
|||
CV_SetValue(&cv_usejoystick[j], -1);
|
||||
CONS_Printf("Device for %d set to %d\n", j, -1);
|
||||
}
|
||||
|
||||
// Prevent excess presses for new players.
|
||||
setup_player[j].delay = TICRATE;
|
||||
}
|
||||
|
||||
setup_numplayers++;
|
||||
p->mdepth = CSSTEP_CHARS;
|
||||
S_StartSound(NULL, sfx_s3k65);
|
||||
|
||||
// Prevent excess presses
|
||||
memset(deviceResponding, false, sizeof (deviceResponding));
|
||||
|
||||
// Prevent quick presses
|
||||
p->delay = MENUDELAYTIME;
|
||||
M_SetMenuDelay(num);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue