Merge branch 'bubble-fuck-off' into 'master'

Bubble Shield pings off walls

See merge request kart-krew-dev/ring-racers-internal!2922
This commit is contained in:
Gunla 2025-10-07 01:35:15 +00:00
commit 81135614ff
3 changed files with 29 additions and 0 deletions

View file

@ -14370,6 +14370,32 @@ boolean K_FastFallBounce(player_t *player)
return false;
}
void K_DappleEmployment(player_t *player)
{
if (player->curshield == KSHIELD_BUBBLE)
{
const boolean JustWallBonked = !!(player->mo->eflags & MFE_JUSTBOUNCEDWALL); // some shit about signed...
const boolean NoMoreBubbleWallHump = (player->ignoreAirtimeLeniency > 0) && JustWallBonked;
// No more vertical wall humping
if (NoMoreBubbleWallHump)
{
K_AddHitLag(player->mo, 8, false);
S_StartSound(player->mo, sfx_kc52); // Bubble wallbonk noise
if (player->mo->hitlag > 0)
{
player->mo->spriteyscale *= 3/2;
player->mo->spritexscale *= 2/3;
}
K_StumblePlayer(player);
player->preventfailsafe = TICRATE*3;
S_StopSoundByID(player->mo, sfx_s3k9b); // Avoid stumble crunch noise
}
}
}
static void K_AirFailsafe(player_t *player)
{
const fixed_t maxSpeed = 6*player->mo->scale;

View file

@ -295,6 +295,7 @@ boolean K_PlayerEBrake(const player_t *player);
boolean K_PlayerGuard(const player_t *player);
SINT8 K_Sliptiding(const player_t *player);
boolean K_FastFallBounce(player_t *player);
void K_DappleEmployment(player_t *player);
fixed_t K_PlayerBaseFriction(const player_t *player, fixed_t original);
void K_AdjustPlayerFriction(player_t *player);
void K_MoveKartPlayer(player_t *player, boolean onground);

View file

@ -4211,6 +4211,8 @@ static void P_BouncePlayerMove(mobj_t *mo, TryMoveResult_t *result)
P_TryMove(mo, mo->x - oldmomx, mo->y - oldmomy, true, NULL);
}
}
K_DappleEmployment(mo->player);
}
//