From 1871cad1d90abd6e400a5360fdc75701ef7e32a3 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Thu, 25 May 2023 23:21:19 -0700 Subject: [PATCH] Require new input to fastfall after bouncing --- src/d_player.h | 1 + src/k_kart.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/d_player.h b/src/d_player.h index a6aa69675..b380ac915 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -108,6 +108,7 @@ typedef enum PF_SHRINKACTIVE = 1<<29, // "Shrink me" cheat is in effect. (Can't be disabled mid-race) PF_VOID = 1<<30, // Removed from reality! When leaving hitlag, reenable visibility+collision and kill speed. + PF_FASTFALLBOUNCED = 1<<31, // Just bounced from a fastfall. Ignore fastfall attempts until input's lifted. // up to 1<<31 is free } pflags_t; diff --git a/src/k_kart.c b/src/k_kart.c index 6339b9e02..7f8899a34 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -10095,6 +10095,7 @@ static void K_KartSpindash(player_t *player) if (K_PlayerEBrake(player) == false) { player->spindash = 0; + player->pflags &= ~PF_FASTFALLBOUNCED; return; } @@ -10106,6 +10107,8 @@ static void K_KartSpindash(player_t *player) } else if (onGround == false) { + if (player->pflags & PF_FASTFALLBOUNCED) + return; // Update fastfall. player->fastfall = player->mo->momz; player->spindash = 0; @@ -10228,6 +10231,7 @@ boolean K_FastFallBounce(player_t *player) player->fastfall = 0; player->fastfallBase = 0; + player->pflags |= PF_FASTFALLBOUNCED; return true; }