mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-28 22:52:45 +00:00
Fixed crash caused by global sound precaching
This is a part of a4710bcdb0a40e477ce53aa4df36ec90d1402358 from master branch https://mantis.zdoom.org/view.php?id=454
This commit is contained in:
parent
a2f6ac1bb3
commit
5327deee43
1 changed files with 4 additions and 4 deletions
|
@ -491,14 +491,14 @@ void S_PrecacheLevel ()
|
|||
actor->MarkPrecacheSounds();
|
||||
}
|
||||
}
|
||||
for (auto i : gameinfo.PrecachedSounds)
|
||||
for (auto snd : gameinfo.PrecachedSounds)
|
||||
{
|
||||
level.info->PrecacheSounds[i].MarkUsed();
|
||||
FSoundID(snd).MarkUsed();
|
||||
}
|
||||
// Precache all extra sounds requested by this map.
|
||||
for (i = 0; i < level.info->PrecacheSounds.Size(); ++i)
|
||||
for (auto snd : level.info->PrecacheSounds)
|
||||
{
|
||||
level.info->PrecacheSounds[i].MarkUsed();
|
||||
FSoundID(snd).MarkUsed();
|
||||
}
|
||||
// Don't unload sounds that are playing right now.
|
||||
for (FSoundChan *chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||
|
|
Loading…
Reference in a new issue