Sets global modIndex to MOD_NONE on scene load

Fixes a crash when buying items in shops due to them
not triggering the rando code that normally sets these items.
May have also been crashing vanilla playthroughs.
This commit is contained in:
Christopher Leggett
2022-08-13 11:49:03 -04:00
parent d167f4a263
commit 105eac4e53
+1
View File
@@ -60,6 +60,7 @@ void OTRGameplay_InitScene(GlobalContext* globalCtx, s32 spawn) {
globalCtx->cUpElfMsgs = nullptr;
globalCtx->setupPathList = nullptr;
globalCtx->numSetupActors = 0;
OTRGlobals::Instance->getItemModIndex = MOD_NONE;
Object_InitBank(globalCtx, &globalCtx->objectCtx);
LightContext_Init(globalCtx, &globalCtx->lightCtx);
TransitionActor_InitContext(&globalCtx->state, &globalCtx->transiActorCtx);