fixed disable acts (#390)

This commit is contained in:
PeachyPeach 2023-05-10 23:07:29 +02:00 committed by GitHub
parent 89fa4fbe5b
commit 52e4bac21a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -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);

View File

@ -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;
}