From d62408f9d8b798c77ca47bfe747124666c64b603 Mon Sep 17 00:00:00 2001 From: AECX Date: Mon, 15 Feb 2021 13:03:36 +0100 Subject: [PATCH] Auto-apply saved-seed if available --- source/mod.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/source/mod.cpp b/source/mod.cpp index 93b47a26..f4945d73 100644 --- a/source/mod.cpp +++ b/source/mod.cpp @@ -884,6 +884,14 @@ hudConsole->addWatch(page, "throw:", &throwResult, 'x', WatchInterpretation::_u1 if (isLoading) { eventListener->checkLoadEvents(); + + // Check if there's a random seed in the current save data + if (*global::seedInSaveFile > 0 && *global::seedInSaveFile != tools::randomSeed) + { + customSeed = true; + tools::randomSeed = *global::seedInSaveFile; + chestRandomizer->generate(); + } } if (controller::checkForButtonInputSingleFrame((controller::PadInputs::Button_R | controller::PadInputs::Button_Z)))