mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Merge branch 'safer-fastfall-momentum-reset'
This commit is contained in:
commit
fd346db927
3 changed files with 6 additions and 8 deletions
12
src/k_kart.c
12
src/k_kart.c
|
|
@ -10451,17 +10451,18 @@ static void K_KartSpindash(player_t *player)
|
||||||
{
|
{
|
||||||
if (player->pflags & PF_NOFASTFALL)
|
if (player->pflags & PF_NOFASTFALL)
|
||||||
return;
|
return;
|
||||||
// Update fastfall.
|
|
||||||
player->fastfall = player->mo->momz;
|
|
||||||
player->spindash = 0;
|
|
||||||
P_ResetPitchRoll(player->mo);
|
|
||||||
|
|
||||||
if (player->fastfallBase == 0)
|
if (player->fastfall == 0)
|
||||||
{
|
{
|
||||||
// Factors 3D momentum.
|
// Factors 3D momentum.
|
||||||
player->fastfallBase = FixedHypot(player->speed, player->mo->momz);
|
player->fastfallBase = FixedHypot(player->speed, player->mo->momz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Update fastfall.
|
||||||
|
player->fastfall = player->mo->momz;
|
||||||
|
player->spindash = 0;
|
||||||
|
P_ResetPitchRoll(player->mo);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (player->fastfall != 0)
|
else if (player->fastfall != 0)
|
||||||
|
|
@ -10589,7 +10590,6 @@ boolean K_FastFallBounce(player_t *player)
|
||||||
player->mo->momz = bounce * P_MobjFlip(player->mo);
|
player->mo->momz = bounce * P_MobjFlip(player->mo);
|
||||||
|
|
||||||
player->fastfall = 0;
|
player->fastfall = 0;
|
||||||
player->fastfallBase = 0;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2583,7 +2583,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
|
||||||
player->driftboost = player->strongdriftboost = 0;
|
player->driftboost = player->strongdriftboost = 0;
|
||||||
player->gateBoost = 0;
|
player->gateBoost = 0;
|
||||||
player->fastfall = 0;
|
player->fastfall = 0;
|
||||||
player->fastfallBase = 0;
|
|
||||||
player->ringboost = 0;
|
player->ringboost = 0;
|
||||||
player->glanceDir = 0;
|
player->glanceDir = 0;
|
||||||
player->pflags &= ~PF_GAINAX;
|
player->pflags &= ~PF_GAINAX;
|
||||||
|
|
|
||||||
|
|
@ -484,7 +484,6 @@ void P_ResetPlayer(player_t *player)
|
||||||
player->trickpanel = 0;
|
player->trickpanel = 0;
|
||||||
player->glanceDir = 0;
|
player->glanceDir = 0;
|
||||||
player->fastfall = 0;
|
player->fastfall = 0;
|
||||||
player->fastfallBase = 0;
|
|
||||||
|
|
||||||
if (player->mo != NULL && P_MobjWasRemoved(player->mo) == false)
|
if (player->mo != NULL && P_MobjWasRemoved(player->mo) == false)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue