Fix enemy rando issues in MQ spirit (#7257)

This commit is contained in:
Pepper0ni
2026-09-26 17:25:09 +01:00
committed by GitHub
parent eccbc72cbe
commit cd38af7955
@@ -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);