diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index f5d4836cd..a0d785909 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -831,6 +831,7 @@ extern "C" void InitOTR() { std::shared_ptr conf = OTRGlobals::Instance->context->GetConfig(); conf->RegisterConfigVersionUpdater(std::make_shared()); + conf->RegisterConfigVersionUpdater(std::make_shared()); conf->RunVersionUpdates(); } diff --git a/soh/soh/config/ConfigUpdaters.cpp b/soh/soh/config/ConfigUpdaters.cpp index c2689e676..1951e78e1 100644 --- a/soh/soh/config/ConfigUpdaters.cpp +++ b/soh/soh/config/ConfigUpdaters.cpp @@ -1,7 +1,9 @@ #include "ConfigUpdaters.h" +#include "soh/Enhancements/audio/AudioCollection.h" namespace LUS { ConfigVersion1Updater::ConfigVersion1Updater() : ConfigVersionUpdater(1) {} + ConfigVersion2Updater::ConfigVersion2Updater() : ConfigVersionUpdater(2) {} void ConfigVersion1Updater::Update(Config* conf) { if (conf->GetInt("Window.Width", 640) == 640) { @@ -60,4 +62,10 @@ namespace LUS { } CVarClear("gSeededRandomizedEnemies"); } -} \ No newline at end of file + + void ConfigVersion2Updater::Update(Config* conf) { + for (auto seq : AudioCollection::Instance->GetAllSequences()) { + CVarClear(std::string("gAudioEditor.ReplacedSequences." + seq.second.sfxKey).c_str()); + } + } +} diff --git a/soh/soh/config/ConfigUpdaters.h b/soh/soh/config/ConfigUpdaters.h index e7f684ae4..cc8f6109a 100644 --- a/soh/soh/config/ConfigUpdaters.h +++ b/soh/soh/config/ConfigUpdaters.h @@ -1,9 +1,15 @@ #include "libultraship/libultraship.h" namespace LUS { -class ConfigVersion1Updater : public ConfigVersionUpdater { - public: - ConfigVersion1Updater(); - void Update(Config* conf); -}; + class ConfigVersion1Updater : public ConfigVersionUpdater { + public: + ConfigVersion1Updater(); + void Update(Config* conf); + }; + + class ConfigVersion2Updater : public ConfigVersionUpdater { + public: + ConfigVersion2Updater(); + void Update(Config* conf); + }; } \ No newline at end of file