Merge branch 'dont-fucking-drown-yourself' into 'master'

Bubble fixups

See merge request KartKrew/Kart!1476
This commit is contained in:
Oni 2023-09-11 01:54:00 +00:00
commit 3dafc6e724
2 changed files with 9 additions and 4 deletions

View file

@ -10555,7 +10555,7 @@ boolean K_FastFallBounce(player_t *player)
if (player->curshield == KSHIELD_BUBBLE)
{
S_StartSound(player->mo, sfx_s3k44);
P_InstaThrust(player->mo, player->mo->angle, max(player->speed, abs(player->fastfall)));
P_InstaThrust(player->mo, player->mo->angle, 11*max(player->speed, abs(player->fastfall))/10);
bounce += 3 * player->mo->scale;
}
else
@ -11432,9 +11432,12 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (player->bubbleblowup > bubbletime*2)
{
K_ThrowKartItem(player, (player->throwdir > 0), MT_BUBBLESHIELDTRAP, -1, 0, 0);
P_InstaThrust(player->mo, player->mo->angle, player->speed + (80 * mapobjectscale));
player->sliptideZipBoost += TICRATE; // Just for keeping speed briefly vs. tripwire etc.
// If this doesn't turn out to be reliable, I'll change it to directly set leniency or something.
if (player->throwdir == -1)
{
P_InstaThrust(player->mo, player->mo->angle, player->speed + (80 * mapobjectscale));
player->sliptideZipBoost += TICRATE; // Just for keeping speed briefly vs. tripwire etc.
// If this doesn't turn out to be reliable, I'll change it to directly set leniency or something.
}
K_PlayAttackTaunt(player->mo);
player->bubbleblowup = 0;
player->bubblecool = 0;

View file

@ -1172,6 +1172,8 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
const fixed_t mult = 3*FRACUNIT + (3 * FixedDiv(mo->player->fastfallBase, unit));
gravityadd = FixedMul(gravityadd, mult);
if (mo->player->curshield == KSHIELD_BUBBLE)
gravityadd *= 2;
}
}
else