From c4cb837a739b14f708ded5090bf81ef4012adbe8 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Thu, 25 Jan 2024 17:08:20 -0700 Subject: [PATCH] Use player max speed for bubblebounce min speed --- src/k_kart.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/k_kart.c b/src/k_kart.c index a11599dd6..a70b43c1d 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -11331,7 +11331,14 @@ boolean K_FastFallBounce(player_t *player) if (player->curshield == KSHIELD_BUBBLE) { S_StartSound(player->mo, sfx_s3k44); - P_InstaThrust(player->mo, player->mo->angle, 11*max(player->speed, abs(player->fastfall))/10); + + // This is a slightly irritating way of doing this, but because ground contact while + // bubblebouncing gives you 1 tic of ground friction, naively using a factor of player + // speed makes your sustained speed heavily gamespeed dependent. + fixed_t minspeed = 12*K_GetKartSpeed(player, false, false)/10; + fixed_t fallspeed = abs(player->fastfall); + P_InstaThrust(player->mo, player->mo->angle, 11*max(minspeed, fallspeed)/10); + bounce += 3 * mapobjectscale; } else