From 44b7d729164d0894f4b3786c85af791ca4eb8c9b Mon Sep 17 00:00:00 2001 From: sonoftunk Date: Sun, 6 Nov 2022 10:36:27 -0500 Subject: [PATCH] Checks Tracker only shows checked locations once in game --- .../Enhancements/randomizer/randomizer_item_tracker.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp index 3b8d5639f..58d368f43 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp @@ -717,6 +717,7 @@ void DrawLocations() { bool lastItemFound = false; bool doAreaScroll = false; + bool inGame = gGlobalCtx != nullptr && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2; RandomizerCheckArea currentArea = RCAREA_INVALID; if (gGlobalCtx != nullptr) currentArea = RandomizerCheckObjects::GetRCAreaBySceneID((SceneID)gGlobalCtx->sceneNum); @@ -743,7 +744,7 @@ void DrawLocations() { } for (auto& locationIt : rcObjects) { // If the location has its scene flag set - if (HasItemBeenCollected(locationIt.second)) { // && checkedLocations.find(locationIt.rc) != checkedLocations.end()) { + if (inGame && HasItemBeenCollected(locationIt.second)) { // && checkedLocations.find(locationIt.rc) != checkedLocations.end()) { // show it as checked checkedLocations.insert(locationIt.second.rc); @@ -819,8 +820,8 @@ void DrawLocations() { auto elfound = checkedLocations.find(locationIt.second.rc); if (locationIt.second.visibleInImgui && elfound != checkedLocations.end()) { // If the location has its scene flag set - if (!HasItemBeenCollected(locationIt.second)) { - // show it as checked + if (!inGame || !HasItemBeenCollected(locationIt.second)) { + // show it as unchecked checkedLocations.erase(locationIt.second.rc); } else if (ImGui::ArrowButton(std::to_string(locationIt.second.rc).c_str(), ImGuiDir_Left)) { checkedLocations.erase(elfound);