diff --git a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp index 5e1b84ec22..eb5c529eff 100644 --- a/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/spoiler_log.cpp @@ -9,6 +9,7 @@ #include "soh/Enhancements/randomizer/randomizer_entrance_tracker.h" #include #include +#include #include #include @@ -90,8 +91,16 @@ static void WriteShuffledEntrance(std::string sphereString, Entrance* entrance) int16_t destinationIndex = -1; int16_t replacementIndex = entrance->GetReplacement()->GetIndex(); int16_t replacementDestinationIndex = -1; - std::string name = EntranceTracker::GetEntranceData(originalIndex)->source; - std::string text = EntranceTracker::GetEntranceData(replacementIndex)->destination; + const EntranceData* sourceData = EntranceTracker::GetEntranceData(originalIndex); + const EntranceData* destinationData = EntranceTracker::GetEntranceData(replacementIndex); + if (sourceData == nullptr || destinationData == nullptr) { + SPDLOG_ERROR("WriteShuffledEntrance: missing entrance data for index {} (override {})", originalIndex, + replacementIndex); + assert(false); + return; + } + std::string name = sourceData->source; + std::string text = destinationData->destination; // Track the reverse destination, useful for savewarp handling if (entrance->GetReverse() != nullptr) { diff --git a/soh/soh/Enhancements/randomizer/entrance.cpp b/soh/soh/Enhancements/randomizer/entrance.cpp index 47aacb76bb..35f92b4ca3 100644 --- a/soh/soh/Enhancements/randomizer/entrance.cpp +++ b/soh/soh/Enhancements/randomizer/entrance.cpp @@ -826,20 +826,16 @@ static bool ValidateWorld(Entrance* entrancePlaced) { // This is mostly relevant when mixing entrance pools or shuffling special interiors (such as windmill or kak // potion shop) Warp Songs and Overworld Spawns can also end up inside certain indoors so those need to be // handled as well - std::array childForbidden = { "OGC Great Fairy Fountain -> Castle Grounds", - "GV Carpenter Tent -> GV Fortress Side", - "Ganon's Castle Entryway -> Castle Grounds From Ganon's Castle" }; + std::array childForbidden = { "OGC Great Fairy Fountain -> Castle Grounds" }; std::array adultForbidden = { "HC Great Fairy Fountain -> Castle Grounds", "HC Storms Grotto -> Castle Grounds" }; auto allShuffleableEntrances = GetShuffleableEntrances(EntranceType::All, false); for (auto& entrance : allShuffleableEntrances) { - std::vector alreadyChecked = {}; if (entrance->IsShuffled()) { if (entrance->GetReplacement() != nullptr) { - auto replacementName = entrance->GetReplacement()->GetName(); alreadyChecked.push_back(entrance->GetReplacement()->GetReverse());