From a195f089a9a846ff866a40e7215d292969dbdc82 Mon Sep 17 00:00:00 2001 From: Pepper0ni <93387759+Pepper0ni@users.noreply.github.com> Date: Wed, 16 Apr 2025 13:10:59 +0100 Subject: [PATCH] remove redundent entrance logic check when adding a region to the pool. --- soh/soh/Enhancements/randomizer/3drando/fill.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/3drando/fill.cpp b/soh/soh/Enhancements/randomizer/3drando/fill.cpp index dcae4842c..ccae257c7 100644 --- a/soh/soh/Enhancements/randomizer/3drando/fill.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/fill.cpp @@ -219,17 +219,18 @@ void ProcessExits(Region* region, GetAccessibleLocationsStruct& gals, Randomizer } ValidateSphereZero(gals); } + // If the exit is accessible and hasn't been added yet, add it to the pool + // RANDOTODO do we want to add the region after the loop now, considering we + // are processing the new region immediately. Maybe a reverse for loop in ProcessRegion? + if (!exitRegion->addedToPool) { + exitRegion->addedToPool = true; + gals.regionPool.push_back(exit.GetConnectedRegionKey()); + } + // process the region we just expanded to, to reduce looping ProcessRegion(exitRegion, gals, ignore, stopOnBeatable, addToPlaythrough); } - // If the exit is accessible and hasn't been added yet, add it to the pool - // RANDOTODO do we want to add the region after the loop now, considering we - // are processing the new region immediately. Maybe a reverse for loop in ProcessRegion? - if (!exitRegion->addedToPool && exit.ConditionsMet()) { - exitRegion->addedToPool = true; - gals.regionPool.push_back(exit.GetConnectedRegionKey()); - } if (addToPlaythrough) { // RANDOTODO Should this match the regular spheres?