summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAECX <maurice.henke@protonmail.com>2021-02-15 13:03:36 +0100
committerAECX <maurice.henke@protonmail.com>2021-02-15 13:03:36 +0100
commitd62408f9d8b798c77ca47bfe747124666c64b603 (patch)
tree0efcbea49a47855c59e8882bb47b40c9a5b02f79
parent0a993ec1d569b8b9ea8941ca43fac2a4444445bd (diff)
Auto-apply saved-seed if availablev0.16.2b
-rw-r--r--source/mod.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/mod.cpp b/source/mod.cpp
index 93b47a2..f4945d7 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)))