From c879c970666cb79ec3bd2f3e301a8ec4c62a6bec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= <159546+serprex@users.noreply.github.com> Date: Fri, 10 Apr 2026 16:37:22 +0000 Subject: [PATCH] randomizer_check_tracker: small cleanup (#6480) --- .../randomizer/randomizer_check_tracker.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp index e42a399bc..83a2a57f4 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp @@ -25,7 +25,6 @@ #include "item_location.h" #include "soh/Enhancements/game-interactor/GameInteractor.h" #include "z64item.h" -#include "fishsanity.h" extern "C" { #include "variables.h" @@ -475,14 +474,9 @@ RandomizerCheckArea GetCheckArea() { return area; } -bool vector_contains_scene(std::vector vec, const int16_t scene) { - return std::any_of(vec.begin(), vec.end(), [&](const auto& x) { return x == scene; }); -} - -std::vector skipScenes = { +std::array skipScenes = { SCENE_GANON_BOSS, SCENE_GANONS_TOWER_COLLAPSE_EXTERIOR, - SCENE_GANON_BOSS, SCENE_INSIDE_GANONS_CASTLE_COLLAPSE, SCENE_GANONS_TOWER_COLLAPSE_INTERIOR, }; @@ -659,7 +653,8 @@ void CheckTrackerTransition(uint32_t sceneNum) { } void CheckTrackerItemReceive(GetItemEntry giEntry) { - if (!GameInteractor::IsSaveLoaded() || vector_contains_scene(skipScenes, gPlayState->sceneNum)) { + if (!GameInteractor::IsSaveLoaded() || std::find(std::begin(skipScenes), std::end(skipScenes), + (SceneID)gPlayState->sceneNum) != std::end(skipScenes)) { return; } auto scene = static_cast(gPlayState->sceneNum);