- SW: fixed DeleteNoSoundOwner still checking for sprites as sound origins.

This commit is contained in:
Christoph Oelckers 2021-12-13 13:17:25 +01:00
parent 0a9792ac28
commit a59173ac31

View file

@ -724,11 +724,10 @@ void COVER_SetReverb(int amt)
void DeleteNoSoundOwner(DSWActor* actor)
{
if (!soundEngine) return;
SPRITEp sp = &actor->s();
soundEngine->EnumerateChannels([=](FSoundChan* chan)
{
if (chan->Source == sp && chan->ChanFlags & CHANF_LOOP)
if (chan->Source == actor && chan->ChanFlags & CHANF_LOOP)
{
soundEngine->StopChannel(chan);
}