mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-28 04:51:42 +00:00
Make it work
Decided to put it in P_BouncePlayerMove, + some flourish
This commit is contained in:
parent
cb3c370e33
commit
5c9730bec8
2 changed files with 20 additions and 1 deletions
19
src/k_kart.c
19
src/k_kart.c
|
|
@ -14372,14 +14372,31 @@ boolean K_FastFallBounce(player_t *player)
|
||||||
|
|
||||||
void K_DappleEmployment(player_t *player)
|
void K_DappleEmployment(player_t *player)
|
||||||
{
|
{
|
||||||
|
if (player->curshield == KSHIELD_BUBBLE)
|
||||||
|
{
|
||||||
const boolean JustWallBonked = ((player->mo->eflags & MFE_JUSTBOUNCEDWALL) != 0); // some shit about signed...
|
const boolean JustWallBonked = ((player->mo->eflags & MFE_JUSTBOUNCEDWALL) != 0); // some shit about signed...
|
||||||
const boolean NoMoreBubbleWallHump = ((player->ignoreAirtimeLeniency > 0) && JustWallBonked);
|
const boolean NoMoreBubbleWallHump = ((player->ignoreAirtimeLeniency > 0) && JustWallBonked);
|
||||||
|
|
||||||
// No more vertical wall humping
|
// No more vertical wall humping
|
||||||
if (NoMoreBubbleWallHump == true)
|
if (NoMoreBubbleWallHump == true)
|
||||||
K_StumblePlayer(player);
|
{
|
||||||
|
|
||||||
|
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);
|
||||||
|
S_StopSoundByID(player->mo, sfx_s3k9b); // Avoid stumble crunch noise
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
CONS_Printf("ignoreAirtimeLeniency: %d JustWallBonked: %d\n", (player->ignoreAirtimeLeniency), JustWallBonked);
|
CONS_Printf("ignoreAirtimeLeniency: %d JustWallBonked: %d\n", (player->ignoreAirtimeLeniency), JustWallBonked);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void K_AirFailsafe(player_t *player)
|
static void K_AirFailsafe(player_t *player)
|
||||||
|
|
|
||||||
|
|
@ -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);
|
P_TryMove(mo, mo->x - oldmomx, mo->y - oldmomy, true, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
K_DappleEmployment(mo->player);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue