Use player max speed for bubblebounce min speed

This commit is contained in:
AJ Martinez 2024-01-25 17:08:20 -07:00
parent 1d8999923c
commit c4cb837a73

View file

@ -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