From 9e212c35824e74e1f2e4771b1d91b8225161824a 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 d5f67f6a1..0e52f2f2f 100644 --- a/src/sound/s_sound.cpp +++ b/src/sound/s_sound.cpp @@ -1156,9 +1156,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; } } }