- fixed Blood's sfxKill3DSound function checking the wrong ID.

This commit is contained in:
Christoph Oelckers 2020-02-16 16:52:02 +01:00
parent c583318f31
commit 19f9860c11

View file

@ -215,9 +215,10 @@ void sfxKill3DSound(spritetype *pSprite, int a2, int a3)
return;
if (a2 >= 0) a2++;
auto sid = soundEngine->FindSoundByResID(a3);
soundEngine->EnumerateChannels([=](FSoundChan* channel)
{
if (channel->SourceType == SOURCE_Actor && channel->Source == pSprite && (a2 < 0 || a2 == channel->EntChannel) && (a3 < 0 || a3 == channel->OrgID))
if (channel->SourceType == SOURCE_Actor && channel->Source == pSprite && (a2 < 0 || a2 == channel->EntChannel) && (a3 < 0 || sid == channel->OrgID))
{
soundEngine->StopChannel(channel);
}