From 78ffb41cd2d8fa3e68ee9fcb1fb496ddeede878e Mon Sep 17 00:00:00 2001 From: Malkierian Date: Mon, 13 Nov 2023 16:11:29 -0700 Subject: [PATCH] Moved the check for `!seqInfo.canBeUsedAsReplacement` in `InitializeShufflePool` to exclude them before modifying either shuffle pool. (#3370) --- soh/soh/Enhancements/audio/AudioCollection.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/soh/soh/Enhancements/audio/AudioCollection.cpp b/soh/soh/Enhancements/audio/AudioCollection.cpp index a5499bd4f..9da742f91 100644 --- a/soh/soh/Enhancements/audio/AudioCollection.cpp +++ b/soh/soh/Enhancements/audio/AudioCollection.cpp @@ -400,8 +400,9 @@ void AudioCollection::InitializeShufflePool() { if (shufflePoolInitialized) return; for (auto& [seqId, seqInfo] : sequenceMap) { + if (!seqInfo.canBeUsedAsReplacement) continue; const std::string cvarKey = "gAudioEditor.Excluded." + seqInfo.sfxKey; - if (CVarGetInteger(cvarKey.c_str(), 0) && !seqInfo.canBeUsedAsReplacement) { + if (CVarGetInteger(cvarKey.c_str(), 0)) { excludedSequences.insert(&seqInfo); } else { includedSequences.insert(&seqInfo);