Sound & timer fixes

- Don't decrease spinout when boosting
- Don't increase banana dragging when in the air or if you're not moving (Not sure about this one, just thought that this would feel better than it always increasing once we add the visual effect)
- Play a sound for banana dragging
- Correct finish line sounds
This commit is contained in:
TehRealSalt 2018-07-10 18:16:53 -04:00
parent 0b01c3868f
commit 301d1ffec6
3 changed files with 14 additions and 8 deletions

View file

@ -2651,7 +2651,12 @@ static void K_MoveHeldObjects(player_t *player)
mobj_t *cur = player->mo->hnext;
mobj_t *targ = player->mo;
if (P_IsObjectOnGround(player->mo) && player->speed > 0)
{
player->kartstuff[k_bananadrag]++;
if (player->kartstuff[k_bananadrag] > TICRATE && leveltime % 7 == 0)
S_StartSound(player->mo, sfx_cdfm70);
}
while (cur && !P_MobjWasRemoved(cur))
{
@ -2745,7 +2750,8 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
if (player->kartstuff[k_spinouttimer])
{
if (P_IsObjectOnGround(player->mo) || player->kartstuff[k_spinouttype] == 1)
if ((P_IsObjectOnGround(player->mo) || player->kartstuff[k_spinouttype] == 1)
&& (player->kartstuff[k_sneakertimer] == 0))
player->kartstuff[k_spinouttimer]--;
if (player->kartstuff[k_spinouttimer] == 0)
player->kartstuff[k_spinouttype] = 0; // Reset type

View file

@ -4223,10 +4223,10 @@ DoneSection2:
}
}
if (player->kartstuff[k_position] == 1)
if (P_IsLocalPlayer(player))
S_StartSound(NULL, sfx_s3k6a);
else if (player->kartstuff[k_position] == 1)
S_StartSound(NULL, sfx_s253);
else if (P_IsLocalPlayer(player))
S_StartSound(NULL, sfx_s24f);
P_DoPlayerExit(player);
}

View file

@ -362,7 +362,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"s24c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s24d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s24e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s24f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Normal finish
{"s24f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s250", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s251", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s252", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
@ -453,7 +453,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"s3k67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart final lap
{"s3k69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Kart finish
{"s3k6b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
@ -677,7 +677,7 @@ sfxinfo_t S_sfx[NUMSFX] =
{"cdfm67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm70", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm70", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Trail item dragging
{"cdfm71", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm72", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"cdfm73", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},