summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_actor.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c
index c4e89adf7..48ca8d414 100644
--- a/soh/src/code/z_actor.c
+++ b/soh/src/code/z_actor.c
@@ -3326,6 +3326,15 @@ Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play
return NULL;
}
+ // The following enemies break when the parent actor isn't the same as what would happen in authentic gameplay.
+ // As such, don't assign a parent to them at all when spawned with Enemy Randomizer.
+ // Gohma (z_boss_goma.c), the Stalchildren spawner (z_en_encount1.c) and the falling platform spawning Stalfos in
+ // Forest Temple (z_bg_mori_bigst.c) that normally rely on this behaviour are changed when
+ // Enemy Rando is on so they still work properly even without assigning a parent.
+ if (CVar_GetS32("gRandomizedEnemies", 0) && (spawnedActor->id == ACTOR_EN_FLOORMAS || spawnedActor->id == ACTOR_EN_PEEHAT)) {
+ return spawnedActor;
+ }
+
parent->child = spawnedActor;
spawnedActor->parent = parent;