From 0dd4ab8f72c329decbfc478ef82eb2a3a5f0c123 Mon Sep 17 00:00:00 2001 From: MelonSpeedruns Date: Fri, 27 May 2022 18:56:21 -0400 Subject: [PATCH] fix n64 save creation with randomizer disabled --- .../gamestates/ovl_file_choose/z_file_nameset_PAL.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c index c1e8ee6f4..a893cf4f9 100644 --- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c +++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_nameset_PAL.c @@ -439,8 +439,13 @@ void FileChoose_DrawNameEntry(GameState* thisx) { gSaveContext.fileNum = this->buttonIndex; - this->n64ddFlags[this->buttonIndex] = CVar_GetS32("gRandomizer", 0) != 0; - gSaveContext.n64ddFlag = CVar_GetS32("gRandomizer", 0) != 0; + this->n64ddFlag = 0; + + if (CVar_GetS32("gRandomizer", 0) != 0) { + this->n64ddFlags[this->buttonIndex] = 1; + this->n64ddFlag = 1; + gSaveContext.n64ddFlag = 1; + } dayTime = ((void)0, gSaveContext.dayTime); Sram_InitSave(this, &this->sramCtx);