Spindashing now considers kickstart accel-produced BT_ACCELERATEs to be legal.

This commit is contained in:
toaster 2022-05-22 21:47:37 +01:00
parent 0973f8e806
commit 0498ed531a

View file

@ -9099,7 +9099,7 @@ static void K_KartSpindashWind(mobj_t *parent)
static void K_KartSpindash(player_t *player) static void K_KartSpindash(player_t *player)
{ {
const INT16 MAXCHARGETIME = K_GetSpindashChargeTime(player); const INT16 MAXCHARGETIME = K_GetSpindashChargeTime(player);
ticcmd_t *cmd = &player->cmd; UINT16 buttons = K_GetKartButtons(player);
boolean spawnWind = (leveltime % 2 == 0); boolean spawnWind = (leveltime % 2 == 0);
if (player->mo->hitlag > 0 || P_PlayerInPain(player)) if (player->mo->hitlag > 0 || P_PlayerInPain(player))
@ -9107,7 +9107,7 @@ static void K_KartSpindash(player_t *player)
player->spindash = 0; player->spindash = 0;
} }
if (player->spindash > 0 && (cmd->buttons & (BT_DRIFT|BT_BRAKE|BT_ACCELERATE)) != (BT_DRIFT|BT_BRAKE|BT_ACCELERATE)) if (player->spindash > 0 && (buttons & (BT_DRIFT|BT_BRAKE|BT_ACCELERATE)) != (BT_DRIFT|BT_BRAKE|BT_ACCELERATE))
{ {
player->spindashspeed = (player->spindash * FRACUNIT) / MAXCHARGETIME; player->spindashspeed = (player->spindash * FRACUNIT) / MAXCHARGETIME;
player->spindashboost = TICRATE; player->spindashboost = TICRATE;
@ -9163,7 +9163,7 @@ static void K_KartSpindash(player_t *player)
if (player->speed < 6*player->mo->scale) if (player->speed < 6*player->mo->scale)
{ {
if ((cmd->buttons & (BT_DRIFT|BT_BRAKE)) == (BT_DRIFT|BT_BRAKE)) if ((buttons & (BT_DRIFT|BT_BRAKE)) == (BT_DRIFT|BT_BRAKE))
{ {
UINT8 ringdropframes = 2 + (player->kartspeed + player->kartweight); UINT8 ringdropframes = 2 + (player->kartspeed + player->kartweight);
INT16 chargetime = MAXCHARGETIME - ++player->spindash; INT16 chargetime = MAXCHARGETIME - ++player->spindash;