mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-07-31 12:00:25 -07:00
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>
This commit is contained in:
parent
4fd0bf402e
commit
6acabae38f
1 changed files with 1 additions and 2 deletions
|
@ -12,7 +12,6 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
extern SaveContext gSaveContext;
|
|
||||||
extern PlayState* gPlayState;
|
extern PlayState* gPlayState;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -275,7 +274,7 @@ bool BeanPlanted(const RandomizerRegion region) {
|
||||||
if (gPlayState != nullptr && gPlayState->sceneNum == sceneID) {
|
if (gPlayState != nullptr && gPlayState->sceneNum == sceneID) {
|
||||||
swch = gPlayState->actorCtx.flags.swch;
|
swch = gPlayState->actorCtx.flags.swch;
|
||||||
} else if (sceneID != SCENE_ID_MAX) {
|
} else if (sceneID != SCENE_ID_MAX) {
|
||||||
swch = gSaveContext.sceneFlags[sceneID].swch;
|
swch = Rando::Context::GetInstance()->GetLogic()->GetSaveContext()->sceneFlags[sceneID].swch;
|
||||||
} else {
|
} else {
|
||||||
swch = 0;
|
swch = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue