fix rando quest selection falling back to vanilla saves (#2599)

This commit is contained in:
Adam Bird 2023-03-08 13:09:22 -05:00 committed by GitHub
parent 60f4f71495
commit 7c558ae089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -1726,6 +1726,8 @@ void SaveManager::DeleteZeldaFile(int fileNum) {
} }
fileMetaInfo[fileNum].valid = false; fileMetaInfo[fileNum].valid = false;
fileMetaInfo[fileNum].randoSave = false; fileMetaInfo[fileNum].randoSave = false;
fileMetaInfo[fileNum].requiresMasterQuest = false;
fileMetaInfo[fileNum].requiresOriginal = false;
GameInteractor::Instance->ExecuteHooks<GameInteractor::OnDeleteFile>(fileNum); GameInteractor::Instance->ExecuteHooks<GameInteractor::OnDeleteFile>(fileNum);
} }

View File

@ -298,9 +298,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.playerName[offset] = Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->playerName[offset]; gSaveContext.playerName[offset] = Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->playerName[offset];
} }
if (fileChooseCtx->questType[fileChooseCtx->buttonIndex] == 2 && strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0 && if (fileChooseCtx->questType[fileChooseCtx->buttonIndex] == 2 && strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0) {
!((Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->requiresMasterQuest && !ResourceMgr_GameHasMasterQuest()) ||
(Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->requiresMasterQuest && !ResourceMgr_GameHasOriginal()))) {
// Set N64DD Flags for save file // Set N64DD Flags for save file
fileChooseCtx->n64ddFlags[fileChooseCtx->buttonIndex] = 1; fileChooseCtx->n64ddFlags[fileChooseCtx->buttonIndex] = 1;
fileChooseCtx->n64ddFlag = 1; fileChooseCtx->n64ddFlag = 1;