summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Leggett <chris@leggett.dev>2025-05-17 02:11:04 -0400
committerGitHub <noreply@github.com>2025-05-16 23:11:04 -0700
commit6acabae38f9445b199979861bcadf432d37522a7 (patch)
tree7c6632875ecb7d64f8db47136a65c0e160899bcd
parent4fd0bf402ee2cc354225f921d1f2e976bfa9f486 (diff)
Prevent another use of gSaveContext during Seed Generation (#5458)
* Prevent BeanPlanted using gSaveContext for seed gen * address malk's comment about extern --------- Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
-rw-r--r--soh/soh/Enhancements/randomizer/location_access.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/soh/soh/Enhancements/randomizer/location_access.cpp b/soh/soh/Enhancements/randomizer/location_access.cpp
index 6cf2aa2ab..ade8cbf72 100644
--- a/soh/soh/Enhancements/randomizer/location_access.cpp
+++ b/soh/soh/Enhancements/randomizer/location_access.cpp
@@ -12,7 +12,6 @@
#include <fstream>
extern "C" {
-extern SaveContext gSaveContext;
extern PlayState* gPlayState;
}
@@ -275,7 +274,7 @@ bool BeanPlanted(const RandomizerRegion region) {
if (gPlayState != nullptr && gPlayState->sceneNum == sceneID) {
swch = gPlayState->actorCtx.flags.swch;
} else if (sceneID != SCENE_ID_MAX) {
- swch = gSaveContext.sceneFlags[sceneID].swch;
+ swch = Rando::Context::GetInstance()->GetLogic()->GetSaveContext()->sceneFlags[sceneID].swch;
} else {
swch = 0;
}