From 4af0f5620de37d9e4bc4879dc801b66beae73822 Mon Sep 17 00:00:00 2001 From: dyceron <38679103+dyceron@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:52:53 -0400 Subject: [PATCH] Attempted fix for Reverse Area 8 crash (#379) * Only update all Metroid setups if RA8 is disabled * Disable intro triggers if going backwards * Add comment * Update all but entry room regardless if ra8 is enabled --- src/open_samus_returns_rando/files/levels/s100_area10.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/open_samus_returns_rando/files/levels/s100_area10.lua b/src/open_samus_returns_rando/files/levels/s100_area10.lua index 844f3fb..44ce78c 100644 --- a/src/open_samus_returns_rando/files/levels/s100_area10.lua +++ b/src/open_samus_returns_rando/files/levels/s100_area10.lua @@ -208,6 +208,11 @@ function s100_area10.OnLarva_010_Generated(_ARG_0_, _ARG_1_) end end function s100_area10.OnMetroidDead() + -- Disable the intro and the camera change triggers if a Metroid has been defeated, which means that Reverse Area 8 should be enabled + Game.DisableTrigger("TG_Intro_Larva") + if Game.GetEntity("TG_ChangeCamera_IntroLarva") ~= nil then + Game.GetEntity("TG_ChangeCamera_IntroLarva").TRIGGER:DisableTrigger() + end if Blackboard.GetProp("DEFEATED_ENEMIES", "Metroid") ~= nil and s100_area10.iNumMetroids == Blackboard.GetProp("DEFEATED_ENEMIES", "Metroid") then if Game.GetEntity("LE_ValveQueen") ~= nil then Game.GetEntity("LE_ValveQueen").MODELUPDATER:SetMeshVisible("Valve", false) @@ -217,7 +222,6 @@ function s100_area10.OnMetroidDead() Scenario.WriteToBlackboard("QueenDiscovered", "b", true) Game.AddSF(3.5, "s100_area10.ScheduledQueenRoar", "") for _FORV_6_, _FORV_7_ in pairs({ - "collision_camera_008", "collision_camera_013", "collision_camera_014", "collision_camera_015",