From 4216776cd6e8a2ac015e31c5dcb0924deb033cdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Tue, 20 May 2025 05:47:04 +0000 Subject: [PATCH] Fix entrance optimization (#5520) I'm an idiot --- soh/soh/Enhancements/randomizer/location_access.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/location_access.cpp b/soh/soh/Enhancements/randomizer/location_access.cpp index 9d4f9a29b..d6efe7b9a 100644 --- a/soh/soh/Enhancements/randomizer/location_access.cpp +++ b/soh/soh/Enhancements/randomizer/location_access.cpp @@ -535,17 +535,17 @@ std::string CleanCheckConditionString(std::string condition) { } namespace Regions { -const auto GetAllRegions() { +auto GetAllRegions() { static const size_t regionCount = RR_MAX - (RR_NONE + 1); static std::array allRegions = {}; - static bool intialized = false; - if (!intialized) { + static bool initialized = false; + if (!initialized) { for (size_t i = 0; i < regionCount; i++) { allRegions[i] = (RandomizerRegion)((RR_NONE + 1) + i); } - intialized = true; + initialized = true; } return allRegions; @@ -684,7 +684,7 @@ std::vector GetShuffleableEntrances(Rando::EntranceType type, Rando::Entrance* GetEntrance(RandomizerRegion source, RandomizerRegion destination) { for (auto& exit : RegionTable(source)->exits) { - if (exit.GetConnectedRegionKey() == destination) { + if (exit.GetOriginalConnectedRegionKey() == destination) { return &exit; } }