From e9a75f6c522611f49976ebdf3a0188239f986428 Mon Sep 17 00:00:00 2001 From: Alayan <25536748+Alayan-stk-2@users.noreply.github.com> Date: Wed, 8 May 2024 17:40:48 +0200 Subject: [PATCH] Fix #3678 Don't play drive-on sound from materials when the game state is paused. --- src/audio/sfx_manager.cpp | 2 +- src/karts/kart.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/audio/sfx_manager.cpp b/src/audio/sfx_manager.cpp index 0a58eecfb..66aeb38b6 100644 --- a/src/audio/sfx_manager.cpp +++ b/src/audio/sfx_manager.cpp @@ -519,7 +519,7 @@ void SFXManager::toggleSound(const bool on) resume_later = (World::getWorld()->getPhase() == World::IN_GAME_MENU_PHASE); for (int n=0; nonSoundEnabledBack(resume_later); } m_all_sfx.unlock(); diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index aef467d75..e72e6ac4b 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -2003,7 +2003,8 @@ void Kart::handleMaterialSFX() bool m_schedule_pause = m_flying || dynamic_cast(getKartAnimation()) || - dynamic_cast(getKartAnimation()); + dynamic_cast(getKartAnimation()) || + World::getWorld()->getPhase() == World::IN_GAME_MENU_PHASE; // terrain sound is not necessarily a looping sound so check its status before // setting its speed, to avoid 'ressuscitating' sounds that had already stopped