From 4414d59fbc666da9992b214c4ac2716b9322dec7 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 29 Feb 2020 09:30:12 +0100 Subject: [PATCH] - added a check to the player sound code to prevent the surfacing sound from blocking out other speech. The start of the third level is badly timed and this will block the introduction line. --- source/sw/src/player.cpp | 2 ++ source/sw/src/sounds.cpp | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index 7f353126a..5b94fb7df 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -3728,6 +3728,8 @@ DoPlayerFall(PLAYERp pp) PlaySound(DIGI_HITGROUND, pp, v3df_follow|v3df_dontpan); } + StopPlayerSound(pp); + // i any kind of crawl key get rid of recoil if (DoPlayerTestCrawl(pp) || TEST_SYNC_KEY(pp, SK_CRAWL)) { diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index 31cef3860..0e7087ff5 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -795,6 +795,12 @@ int _PlayerSound(int num, PLAYERp pp) if (vp->priority != PRI_PLAYERVOICE && vp->priority != PRI_PLAYERDEATH) return 0; + // The surfacing sound should not block other player speech. + if (soundEngine->IsSourcePlayingSomething(SOURCE_Player, pp, CHAN_VOICE, DIGI_SURFACE)) + { + soundEngine->StopSound(SOURCE_Player, pp, CHAN_VOICE); + } + // He wasn't talking, but he will be now. if (!soundEngine->IsSourcePlayingSomething(SOURCE_Player, pp, CHAN_VOICE)) {