From 9430e1556fa41496eb49aee9d0be237f1c66a3d3 Mon Sep 17 00:00:00 2001 From: Marisa Kirisame Date: Tue, 17 Dec 2019 13:38:49 +0100 Subject: [PATCH] Change IsSourcePlayingSomething to handle overlapping sounds. --- src/sound/s_sound.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sound/s_sound.cpp b/src/sound/s_sound.cpp index 4ca27902c..832ad145e 100644 --- a/src/sound/s_sound.cpp +++ b/src/sound/s_sound.cpp @@ -1155,9 +1155,9 @@ bool SoundEngine::IsSourcePlayingSomething (int sourcetype, const void *actor, i { if (chan->SourceType == sourcetype && chan->Source == actor) { - if (channel == 0 || chan->EntChannel == channel) + if ((channel == 0 || chan->EntChannel == channel) && (sound_id <= 0 || chan->OrgID == sound_id)) { - return sound_id <= 0 || chan->OrgID == sound_id; + return true; } } }