Merge branch 'spring-reset' into 'master'

Reset pitch/roll on springs + trick panels

Closes #348

See merge request KartKrew/Kart!798
This commit is contained in:
Sal 2022-12-06 10:22:29 +00:00
commit c5472a23f6
2 changed files with 9 additions and 0 deletions

View file

@ -6658,6 +6658,9 @@ void K_DoPogoSpring(mobj_t *mo, fixed_t vertispeed, UINT8 sound)
mo->momz = FixedDiv(mo->momz, FixedSqrt(3*FRACUNIT));
}
mo->pitch = 0;
mo->roll = 0;
if (sound)
{
S_StartSound(mo, (sound == 1 ? sfx_kc2f : sfx_kpogos));

View file

@ -478,6 +478,12 @@ void P_ResetPlayer(player_t *player)
player->trickpanel = 0;
player->glanceDir = 0;
player->fastfall = 0;
if (player->mo != NULL && P_MobjWasRemoved(player->mo) == false)
{
player->mo->pitch = 0;
player->mo->roll = 0;
}
}
//