mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
- fixed: forgettable channels must not be tested for sound limits because they no longer have a valid source.
This commit is contained in:
parent
6b0711ff0c
commit
c3ba6d00e6
1 changed files with 2 additions and 0 deletions
|
@ -885,6 +885,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;
|
||||||
|
@ -1426,6 +1427,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);
|
||||||
|
|
Loading…
Reference in a new issue