mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Scale fast fall momentum with speed at time of trigger
Previous was 4x gravity. Now 3x at the lowest, scales up to around 8x at 200% speed (can go further).
This commit is contained in:
parent
94faf486fd
commit
f390ff26ec
2 changed files with 12 additions and 1 deletions
|
|
@ -9946,6 +9946,13 @@ static void K_KartSpindash(player_t *player)
|
|||
// Update fastfall.
|
||||
player->fastfall = player->mo->momz;
|
||||
player->spindash = 0;
|
||||
|
||||
if (player->fastfallBase == 0)
|
||||
{
|
||||
// Factors 3D momentum.
|
||||
player->fastfallBase = FixedHypot(player->speed, player->mo->momz);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else if (player->fastfall != 0)
|
||||
|
|
|
|||
|
|
@ -1148,7 +1148,11 @@ fixed_t P_GetMobjGravity(mobj_t *mo)
|
|||
else if (mo->player->fastfall != 0)
|
||||
{
|
||||
// Fast falling
|
||||
gravityadd *= 4;
|
||||
|
||||
const fixed_t unit = 64 * mapobjectscale;
|
||||
const fixed_t mult = 3*FRACUNIT + (3 * FixedDiv(mo->player->fastfallBase, unit));
|
||||
|
||||
gravityadd = FixedMul(gravityadd, mult);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue