Merge branch 'master' into powerslave

This commit is contained in:
Christoph Oelckers 2019-12-27 20:06:44 +01:00
commit c41c585c7f

View file

@ -887,6 +887,7 @@ bool SoundEngine::CheckSoundLimit(sfxinfo_t *sfx, const FVector3 &pos, int near_
for (chan = Channels, count = 0; chan != NULL && count < near_limit; chan = chan->NextChan) for (chan = Channels, count = 0; chan != NULL && count < near_limit; chan = chan->NextChan)
{ {
if (chan->ChanFlags & CHANF_FORGETTABLE) continue;
if (!(chan->ChanFlags & CHANF_EVICTED) && &S_sfx[chan->SoundID] == sfx) if (!(chan->ChanFlags & CHANF_EVICTED) && &S_sfx[chan->SoundID] == sfx)
{ {
FVector3 chanorigin; FVector3 chanorigin;
@ -1428,6 +1429,7 @@ void SoundEngine::StopChannel(FSoundChan *chan)
if (chan->SourceType == SOURCE_Actor) if (chan->SourceType == SOURCE_Actor)
{ {
chan->Source = NULL; chan->Source = NULL;
chan->SourceType = SOURCE_Unattached;
} }
} }
if (GSnd) GSnd->StopChannel(chan); if (GSnd) GSnd->StopChannel(chan);