diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index b2e2905ed..6469aa0fc 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -204,6 +204,8 @@ void SaveManager::LoadRandomizerVersion2() { std::shared_ptr randomizer = OTRGlobals::Instance->gRandomizer; + randomizer->LoadRandomizerSettings(""); + size_t merchantPricesSize = 0; SaveManager::Instance->LoadData("merchantPricesSize", merchantPricesSize); diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index edf3191c9..ad78df64e 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -197,12 +197,6 @@ void Sram_OpenSave() { } } - // Setup the modified entrance table and entrance shuffle table for rando - if (gSaveContext.n64ddFlag) { - Entrance_Init(); - Entrance_InitEntranceTrackingData(); - } - osSyncPrintf("scene_no = %d\n", gSaveContext.entranceIndex); osSyncPrintf(VT_RST); diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c index 877da8daf..141506c73 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c @@ -2143,13 +2143,19 @@ void FileChoose_LoadGame(GameState* thisx) { } } - // Handle randomized spawn positions after the save context has been setup from load - // When remeber save location is on, set save warp if the save was in an a grotto, or - // the entrance index is -1 from shuffle overwarld spawn - if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES) && ((!CVarGetInteger("gRememberSaveLocation", 0) || - gSaveContext.savedSceneNum == SCENE_YOUSEI_IZUMI_TATE || gSaveContext.savedSceneNum == SCENE_KAKUSIANA) || - (CVarGetInteger("gRememberSaveLocation", 0) && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_SPAWNS) && gSaveContext.entranceIndex == -1))) { - Entrance_SetSavewarpEntrance(); + if (gSaveContext.n64ddFlag) { + // Setup the modified entrance table and entrance shuffle table for rando + Entrance_Init(); + Entrance_InitEntranceTrackingData(); + + // Handle randomized spawn positions after the save context has been setup from load + // When remeber save location is on, set save warp if the save was in an a grotto, or + // the entrance index is -1 from shuffle overwarld spawn + if (Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES) && ((!CVarGetInteger("gRememberSaveLocation", 0) || + gSaveContext.savedSceneNum == SCENE_YOUSEI_IZUMI_TATE || gSaveContext.savedSceneNum == SCENE_KAKUSIANA) || + (CVarGetInteger("gRememberSaveLocation", 0) && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_SPAWNS) && gSaveContext.entranceIndex == -1))) { + Entrance_SetSavewarpEntrance(); + } } }