Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Child Zelda Skip rando setting always on #871

Merged
merged 7 commits into from
Jul 21, 2022

Conversation

jbodner09
Copy link
Contributor

The setting was being written improperly to the spoiler log and also read improperly. It's now being written as a string and then manually set as an int like all other rando settings. Closes #859

@crowell
Copy link
Contributor

crowell commented Jul 21, 2022

it doesn't seem to be "always on". for me it seems somewhat random. maybe something is not initialized?

@crowell
Copy link
Contributor

crowell commented Jul 21, 2022

diff --git a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
index 5deea40..4f7c2d1 100644
--- a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp
@@ -42,7 +42,7 @@ static RandomizerHash randomizerHash;
 static SpoilerData spoilerData;
 
 void GenerateHash() {
-    for (size_t i = 0; i < Settings::seed.size(); i++) {
+    for (size_t i = 0; i < Settings::hashIconIndexes.size(); i++) {
         int number = Settings::seed[i] - '0';
         Settings::hashIconIndexes[i] = number;
     }
diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp
index 09704e8..9091434 100644
--- a/soh/soh/Enhancements/randomizer/randomizer.cpp
+++ b/soh/soh/Enhancements/randomizer/randomizer.cpp
@@ -4756,4 +4756,4 @@ void Rando_Init(void) {
     InitRando();
 }
 
-}
\ No newline at end of file
+}

this diff should work instead.

@jbodner09
Copy link
Contributor Author

To close the thread: the actual issue was indeed something stomping memory after reading in the cvar. Regressing commit was briaguya-ai@b00c3dd#diff-b38d7696c710c1302dee46cebfa8a7ef693286dacfb3d79c910446d648dc1183

@jbodner09 jbodner09 requested review from briaguya-ai and crowell July 21, 2022 06:09
Copy link
Contributor

@dcvz dcvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Good job to all, figuring this one out :)

Copy link
Contributor

@crowell crowell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dcvz
Copy link
Contributor

dcvz commented Jul 21, 2022

@jbodner09 sorry one more thing: this would be a great fix to have in Rachael's second release. Could you point this at develop-Rachael?

Copy link
Contributor

@briaguya-ai briaguya-ai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should get this in Rachael

@dcvz dcvz changed the base branch from develop-zhora to develop-rachael July 21, 2022 20:09
Copy link
Collaborator

@Kenix3 Kenix3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll also need a PR for zhora.

@dcvz dcvz merged commit e519caa into HarbourMasters:develop-rachael Jul 21, 2022
@jbodner09 jbodner09 deleted the fix-zelda-skip branch July 22, 2022 04:21
Kenix3 pushed a commit to Kenix3/Shipwright that referenced this pull request Oct 19, 2022
Fix Child Zelda Skip rando setting always on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Skip Child Zelda" always true, resulting in softlocks (soh 3.0.0 mac pre-build, Apple M1)
5 participants