- 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.
This commit is contained in:
Christoph Oelckers 2020-02-29 09:30:12 +01:00
parent b68cbddb7d
commit 4414d59fbc
2 changed files with 8 additions and 0 deletions

View File

@ -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))
{

View File

@ -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))
{