From 52e4bac21ab8bfc0fd53084a490e90307cd9ffdb Mon Sep 17 00:00:00 2001 From: PeachyPeach <72323920+PeachyPeachSM64@users.noreply.github.com> Date: Wed, 10 May 2023 23:07:29 +0200 Subject: [PATCH] fixed disable acts (#390) --- src/engine/level_script.c | 4 ++-- src/game/level_update.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/engine/level_script.c b/src/engine/level_script.c index c9bda5e0..55c2ae62 100644 --- a/src/engine/level_script.c +++ b/src/engine/level_script.c @@ -938,7 +938,7 @@ static void level_cmd_place_object_ext(void) { return; } - if (sCurrAreaIndex != -1 && ((CMD_GET(u8, 2) & val7) || CMD_GET(u8, 2) == 0x1F)) { + if (sCurrAreaIndex != -1 && (gLevelValues.disableActs || (CMD_GET(u8, 2) & val7) || CMD_GET(u8, 2) == 0x1F)) { u16 model = CMD_GET(u8, 3); if (model >= MAX_LOADED_GRAPH_NODES) { model = MODEL_NONE; } spawnInfo = alloc_only_pool_alloc(sLevelPool, sizeof(struct SpawnInfo)); @@ -1010,7 +1010,7 @@ static void level_cmd_place_object_ext2(void) { return; } - if (sCurrAreaIndex != -1 && ((CMD_GET(u8, 2) & val7) || CMD_GET(u8, 2) == 0x1F)) { + if (sCurrAreaIndex != -1 && (gLevelValues.disableActs || (CMD_GET(u8, 2) & val7) || CMD_GET(u8, 2) == 0x1F)) { spawnInfo = alloc_only_pool_alloc(sLevelPool, sizeof(struct SpawnInfo)); spawnInfo->startPos[0] = CMD_GET(s16, 4); diff --git a/src/game/level_update.c b/src/game/level_update.c index 5f11b95d..311eabda 100644 --- a/src/game/level_update.c +++ b/src/game/level_update.c @@ -1874,6 +1874,10 @@ s32 lvl_set_current_level(UNUSED s16 arg0, s32 levelNum) { return hookUseActSelect; } + if (gLevelValues.disableActs) { + return 0; + } + if (gCurrCourseNum > COURSE_STAGES_MAX || warpCheckpointActive) { return 0; }