From 730f788a071d6791a8dc7d29a2daa3dd88269583 Mon Sep 17 00:00:00 2001 From: AJ Martinez Date: Sun, 22 Oct 2023 01:51:58 -0700 Subject: [PATCH] Sliptide SFX perf optimization --- src/k_kart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/k_kart.c b/src/k_kart.c index d8548c27d..a8c80559d 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -9892,7 +9892,7 @@ static void K_KartDrift(player_t *player, boolean onground) { if (!keepsliptide && K_IsLosingSliptideZip(player) && player->sliptideZip > 0) { - if (!S_SoundPlaying(player->mo, sfx_waved2) && player->sliptideZip > HIDEWAVEDASHCHARGE) + if (player->sliptideZip > HIDEWAVEDASHCHARGE && !S_SoundPlaying(player->mo, sfx_waved2)) S_StartSoundAtVolume(player->mo, sfx_waved2, 255); // Losing combo time, going to boost S_StopSoundByID(player->mo, sfx_waved1); S_StopSoundByID(player->mo, sfx_waved4); @@ -9954,7 +9954,7 @@ static void K_KartDrift(player_t *player, boolean onground) player->sliptideZipDelay = 0; S_StopSoundByID(player->mo, sfx_waved2); S_StopSoundByID(player->mo, sfx_waved4); - if (!S_SoundPlaying(player->mo, sfx_waved1) && player->sliptideZip > HIDEWAVEDASHCHARGE) + if (player->sliptideZip > HIDEWAVEDASHCHARGE && !S_SoundPlaying(player->mo, sfx_waved1)) S_StartSoundAtVolume(player->mo, sfx_waved1, 255); // Charging }