Change button mappings ingame. Put delay after remapping a button to avoid very silly things

This commit is contained in:
SinnamonLat 2022-02-19 19:25:51 +01:00
parent 2b74b7188f
commit 33639d7a4c
2 changed files with 8 additions and 5 deletions

View file

@ -990,20 +990,20 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
}
// drift
if (G_PlayerInputDown(forplayer, gc_c, 0))
if (G_PlayerInputDown(forplayer, gc_r, 0))
{
cmd->buttons |= BT_DRIFT;
}
// A + B + C shortcut
if (G_PlayerInputDown(forplayer, gc_abc, 0))
// C
if (G_PlayerInputDown(forplayer, gc_c, 0))
{
forward = 0;
cmd->buttons |= BT_SPINDASHMASK;
}
// fire
if (G_PlayerInputDown(forplayer, gc_x, 0))
if (G_PlayerInputDown(forplayer, gc_l, 0))
{
cmd->buttons |= BT_ATTACK;
}

View file

@ -3961,7 +3961,10 @@ void M_MapProfileControl(event_t *ev)
// Only consider keydown and joystick events to make sure we ignore ev_mouse and other events
if (ev->type != ev_keydown && ev->type != ev_joystick)
return;
// Set menu delay regardless of what we're doing to avoid stupid stuff.
M_SetMenuDelay(0);
// Check if this control is already assigned, it'd look silly to assign the same key twice on the same thing.
if (n == 0 && optionsmenu.profile->controls[controln][1] == c)
{