Add check to all of the friction stuff

This commit is contained in:
fickleheart 2019-02-19 17:05:04 -06:00
parent 8988927d16
commit a59a1c53b0

View file

@ -5440,6 +5440,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
} }
} }
if (onground)
{
// Friction // Friction
if (!player->kartstuff[k_offroad]) if (!player->kartstuff[k_offroad])
{ {
@ -5471,13 +5473,14 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
} }
// Wipeout slowdown // Wipeout slowdown
if (player->kartstuff[k_spinouttimer] && player->kartstuff[k_wipeoutslow] && P_IsObjectOnGround(player->mo)) if (player->kartstuff[k_spinouttimer] && player->kartstuff[k_wipeoutslow])
{ {
if (player->kartstuff[k_offroad]) if (player->kartstuff[k_offroad])
player->mo->friction -= 4912; player->mo->friction -= 4912;
if (player->kartstuff[k_wipeoutslow] == 1) if (player->kartstuff[k_wipeoutslow] == 1)
player->mo->friction -= 9824; player->mo->friction -= 9824;
} }
}
K_KartDrift(player, onground); K_KartDrift(player, onground);