From cd38af795596101d6bd7d756cefa779f8b526e05 Mon Sep 17 00:00:00 2001 From: Pepper0ni <93387759+Pepper0ni@users.noreply.github.com> Date: Sat, 26 Sep 2026 17:25:09 +0100 Subject: [PATCH] Fix enemy rando issues in MQ spirit (#7257) --- soh/soh/Enhancements/ExtraModes/EnemyRandomizer.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/soh/soh/Enhancements/ExtraModes/EnemyRandomizer.cpp b/soh/soh/Enhancements/ExtraModes/EnemyRandomizer.cpp index 4a09a5a5a3..b9c2b4dec4 100644 --- a/soh/soh/Enhancements/ExtraModes/EnemyRandomizer.cpp +++ b/soh/soh/Enhancements/ExtraModes/EnemyRandomizer.cpp @@ -13,6 +13,7 @@ #include "soh/SohGui/MenuTypes.h" #include "soh/SohGui/SohMenu.h" #include "soh/ShipInit.hpp" +#include "z64scene.h" extern "C" { #include @@ -329,6 +330,11 @@ static bool IsEnemyAllowedToSpawn(s16 sceneNum, s8 roomNum, EnemyEntry enemy, s1 return false; } + // Don't allow Lizalfos in the silver rupee bridge room of spirit, as they spawn in the room above + if (sceneNum == SCENE_SPIRIT_TEMPLE && roomNum == 2 && enemy.id == ACTOR_EN_ZF && enemy.params == -1) { + return false; + } + // Don't allow big Stalchildren, big Peahats and Baris (big jellyfish) during the Gohma fight because they can clip // into Gohma and it crashes the game. Likely because Gohma on the ceiling can't handle collision with other // enemies. @@ -557,6 +563,11 @@ static u8 GetRandomizedEnemy(PlayState* play, s16* actorId, s16* posX, s16* posY // when not twisted, the whole floor is at 1228 *posY = 1228; + } else if (isMQ && play->sceneNum == SCENE_SPIRIT_TEMPLE && play->roomCtx.curRoom.num == 27) { + // Similar to the twisted hallway, the turntable here is an actor used as flooring, so the enemy needs + // spawning on it + + *posY = 50; } else { raycastResult = BgCheck_AnyRaycastFloor1(&play->colCtx, &poly, &pos);