Merge branch 'sneakernoaccelbutton' into 'next'

Make k_sneakertimer no longer hold acceleration input

See merge request KartKrew/Kart-Public!358
This commit is contained in:
NepDisk 2024-04-22 21:56:33 +00:00
commit 385fddd960

View file

@ -1494,7 +1494,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
{
// forward with key or button // SRB2kart - we use an accel/brake instead of forward/backward.
axis = JoyAxis(AXISMOVE, ssplayer);
if (InputDown(gc_accelerate, ssplayer) || (gamepadjoystickmove && axis > 0) || player->kartstuff[k_sneakertimer])
if (InputDown(gc_accelerate, ssplayer) || (gamepadjoystickmove && axis > 0))
{
cmd->buttons |= BT_ACCELERATE;
forward = forwardmove[1]; // 50
@ -1505,6 +1505,8 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
// JOYAXISRANGE is supposed to be 1023 (divide by 1024)
forward += ((axis * forwardmove[1]) / (JOYAXISRANGE-1));
}
else if (player->kartstuff[k_sneakertimer])
forward = forwardmove[1]; // 50
axis = JoyAxis(AXISBRAKE, ssplayer);
if (InputDown(gc_brake, ssplayer) || (gamepadjoystickmove && axis > 0))