Change IsSourcePlayingSomething to handle overlapping sounds.

This commit is contained in:
Marisa Kirisame 2019-12-17 13:38:49 +01:00 committed by Christoph Oelckers
parent 0ba6816622
commit 9430e1556f

View file

@ -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;
}
}
}