Apply banana drag effect to offroad

This commit is contained in:
TehRealSalt 2018-11-18 17:01:43 -05:00
parent 22b3a29d12
commit a3211df748

View file

@ -1625,6 +1625,14 @@ static void K_GetKartBoostPower(player_t *player)
else if (player->kartstuff[k_bananadrag] > TICRATE) else if (player->kartstuff[k_bananadrag] > TICRATE)
boostpower = 4*boostpower/5; boostpower = 4*boostpower/5;
// Banana drag/offroad dust
if (boostpower < FRACUNIT)
{
K_SpawnWipeoutTrail(player->mo, true);
if (leveltime % 6 == 0)
S_StartSound(player->mo, sfx_cdfm70);
}
if (player->kartstuff[k_sneakertimer]) // Sneaker if (player->kartstuff[k_sneakertimer]) // Sneaker
{ {
switch (gamespeed) switch (gamespeed)
@ -3564,15 +3572,7 @@ static void K_MoveHeldObjects(player_t *player)
mobj_t *targ = player->mo; mobj_t *targ = player->mo;
if (P_IsObjectOnGround(player->mo) && player->speed > 0) if (P_IsObjectOnGround(player->mo) && player->speed > 0)
{
player->kartstuff[k_bananadrag]++; player->kartstuff[k_bananadrag]++;
if (player->kartstuff[k_bananadrag] > TICRATE)
{
K_SpawnWipeoutTrail(player->mo, true);
if (leveltime % 6 == 0)
S_StartSound(player->mo, sfx_cdfm70);
}
}
while (cur && !P_MobjWasRemoved(cur)) while (cur && !P_MobjWasRemoved(cur))
{ {