diff options
| author | Philip Dubé <159546+serprex@users.noreply.github.com> | 2026-08-09 02:07:06 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-09 02:07:06 +0000 |
| commit | af485bf64c3f815e52df3b19ff51e90fcc429223 (patch) | |
| tree | fe6a4f45cf06f821c92a971fec15ee6c11b33653 | |
| parent | 5ecff16bdb259b8aed7b2d53e03e32e6dcef72ae (diff) | |
Fix bugs in hints (#7046)
1. fix filtering trials hints when only 1-3 required
2. clearing names per iteration won't work with dual hints
| -rw-r--r-- | soh/soh/Enhancements/randomizer/3drando/hints.cpp | 4 | ||||
| -rw-r--r-- | soh/soh/Enhancements/randomizer/hint.cpp | 7 | ||||
| -rw-r--r-- | soh/soh/resource/type/Scene.cpp | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/soh/soh/Enhancements/randomizer/3drando/hints.cpp b/soh/soh/Enhancements/randomizer/3drando/hints.cpp index f16b88a1a..39134196e 100644 --- a/soh/soh/Enhancements/randomizer/3drando/hints.cpp +++ b/soh/soh/Enhancements/randomizer/3drando/hints.cpp @@ -480,8 +480,8 @@ static void CreateTrialHints(uint8_t copies) { ctx->GetTrials()->GetTrialList(); // there's probably a way to remove this assignment if (ctx->GetOption(RSK_TRIAL_COUNT).Get() >= 4) { // 4 or 5 required trials, get skipped trials trials = FilterFromPool(trials, [](TrialInfo* trial) { return trial->IsSkipped(); }); - } else { // 1 to 3 trials, get requried trials - auto requiredTrials = FilterFromPool(trials, [](TrialInfo* trial) { return trial->IsRequired(); }); + } else { // 1 to 3 trials, get required trials + trials = FilterFromPool(trials, [](TrialInfo* trial) { return trial->IsRequired(); }); } for (auto& trial : trials) { // create a hint for each hinted trial AddGossipStoneHintCopies(copies, HINT_TYPE_TRIAL, "Trial", {}, {}, {}, { trial->GetTrialKey() }); diff --git a/soh/soh/Enhancements/randomizer/hint.cpp b/soh/soh/Enhancements/randomizer/hint.cpp index 3079bb040..4b8383b76 100644 --- a/soh/soh/Enhancements/randomizer/hint.cpp +++ b/soh/soh/Enhancements/randomizer/hint.cpp @@ -181,9 +181,10 @@ void Hint::NamesChosen() { } if (hintType == HINT_TYPE_ITEM || hintType == HINT_TYPE_ITEM_AREA) { + namesTemp.clear(); + saveNames = false; + for (size_t c = 0; c < locations.size(); c++) { - namesTemp = {}; - saveNames = false; uint8_t selection = GetRandomHintTextEntry(GetItemHintText(static_cast<u8>(c))); if (selection > 0) { saveNames = true; @@ -197,7 +198,7 @@ void Hint::NamesChosen() { if (hintType == HINT_TYPE_FOOLISH || hintType == HINT_TYPE_ITEM_AREA || hintType == HINT_TYPE_WOTH || hintType == HINT_TYPE_ALTAR_CHILD || hintType == HINT_TYPE_ALTAR_ADULT) { - namesTemp = {}; + namesTemp.clear(); saveNames = false; for (uint8_t c = 0; c < areas.size(); c++) { diff --git a/soh/soh/resource/type/Scene.cpp b/soh/soh/resource/type/Scene.cpp index 9b93e4aea..bd7313de2 100644 --- a/soh/soh/resource/type/Scene.cpp +++ b/soh/soh/resource/type/Scene.cpp @@ -2,7 +2,7 @@ namespace SOH { void* Scene::GetPointer() { - // Scene is a special type that requries C++ processing. As such, we return nothing. + // Scene is a special type that requires C++ processing. As such, we return nothing. return nullptr; } |
