summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPepper0ni <93387759+Pepper0ni@users.noreply.github.com>2026-09-26 17:25:09 +0100
committerGitHub <noreply@github.com>2026-09-26 16:25:09 +0000
commitcd38af795596101d6bd7d756cefa779f8b526e05 (patch)
treebc3fea80dc3e421063bc547f2f0638a74c108736
parenteccbc72cbea420298163f72b349f28f7622b7e3c (diff)
Fix enemy rando issues in MQ spirit (#7257)
-rw-r--r--soh/soh/Enhancements/ExtraModes/EnemyRandomizer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/soh/soh/Enhancements/ExtraModes/EnemyRandomizer.cpp b/soh/soh/Enhancements/ExtraModes/EnemyRandomizer.cpp
index 4a09a5a5a..b9c2b4dec 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 <z64.h>
@@ -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);