Add sounds to slipide zip / wavedashing

This commit is contained in:
AJ Martinez 2023-03-07 03:20:41 -07:00
parent e4ba544994
commit 65b62e07c8
3 changed files with 23 additions and 1 deletions

View file

@ -9411,6 +9411,9 @@ static void K_KartDrift(player_t *player, boolean onground)
{
if (K_IsLosingSliptideZip(player) && player->sliptideZip > 0)
{
if (!S_SoundPlaying(player->mo, sfx_waved2))
S_StartSound(player->mo, sfx_waved2);
S_StopSoundByID(player->mo, sfx_waved1);
player->sliptideZipDelay++;
if (player->sliptideZipDelay > TICRATE)
{
@ -9439,9 +9442,16 @@ static void K_KartDrift(player_t *player, boolean onground)
K_SpawnDriftBoostExplosion(player, 0);
player->sliptideZip = 0;
player->sliptideZipDelay = 0;
S_StartSound(player->mo, sfx_s3kb6);
S_StopSoundByID(player->mo, sfx_waved1);
S_StopSoundByID(player->mo, sfx_waved2);
S_StartSound(player->mo, sfx_waved3);
}
}
else
{
S_StopSoundByID(player->mo, sfx_waved1);
S_StopSoundByID(player->mo, sfx_waved2);
}
player->aizdrifttilt -= player->aizdrifttilt / 4;
player->aizdriftturn -= player->aizdriftturn / 4;
@ -9454,6 +9464,9 @@ static void K_KartDrift(player_t *player, boolean onground)
else
{
player->sliptideZipDelay = 0;
S_StopSoundByID(player->mo, sfx_waved2);
if (!S_SoundPlaying(player->mo, sfx_waved1))
S_StartSound(player->mo, sfx_waved1);
}
if (player->drift

View file

@ -1131,6 +1131,10 @@ sfxinfo_t S_sfx[NUMSFX] =
{"gate04", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"gate05", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"waved1", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"waved2", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"waved3", false, 32, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""},
// Passing sounds
{"pass01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"pass02", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},

View file

@ -1199,6 +1199,11 @@ typedef enum
sfx_gate04,
sfx_gate05,
// Wavedashing
sfx_waved1,
sfx_waved2,
sfx_waved3,
// Passing sounds
sfx_pass01,
sfx_pass02,