summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Leggett <chris@leggett.dev>2022-12-12 20:50:13 -0500
committerGitHub <noreply@github.com>2022-12-12 20:50:13 -0500
commitf80091af77049a9dc6b265b3978f7b9523bc0b9e (patch)
treef17c2e635da226ecb91b8a2b59c5e7ff8804b290
parent0b24f3274a4f8895d56f0fdbf40c312b613fe200 (diff)
Prevents autosave during Ganon fight. (#2163)
* Prevents autosave during Ganon fight. * Removes unnecessary switch case.
-rw-r--r--soh/src/code/z_parameter.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index 78b916729..8295b0845 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -2717,7 +2717,7 @@ u8 Item_CheckObtainability(u8 item) {
// Save when receiving an item, unless it's purchased from a shop
void PerformAutosave(PlayState* play, u8 item) {
- if (CVar_GetS32("gAutosave", 0) && (play != NULL) && (play->sceneNum != SCENE_KENJYANOMA) && (gSaveContext.pendingSale == ITEM_NONE)) {
+ if (CVar_GetS32("gAutosave", 0) && (play != NULL) && (play->sceneNum != SCENE_KENJYANOMA) && (gSaveContext.pendingSale == ITEM_NONE) && (play->sceneNum != SCENE_GANON_DEMO)) {
if (CVar_GetS32("gAutosaveAllItems", 0)) {
Play_PerformSave(play);
} else if (CVar_GetS32("gAutosaveMajorItems", 1)) {
@@ -2754,10 +2754,6 @@ void PerformAutosave(PlayState* play, u8 item) {
case ITEM_ARROWS_LARGE:
case ITEM_SEEDS_30:
break;
- case ITEM_SWORD_MASTER:
- if (play->sceneNum == SCENE_GANON_DEMO) {
- break;
- }
case ITEM_BOMBCHU:
case ITEM_BOMBCHUS_5:
case ITEM_BOMBCHUS_20: