From 0f41b2591853e915ebec5b749a2c81d5a44b6cd5 Mon Sep 17 00:00:00 2001 From: inspectredc <78732756+inspectredc@users.noreply.github.com> Date: Sun, 10 Sep 2023 18:48:17 +0100 Subject: [PATCH] bush drop fix (#3148) --- soh/soh/SohMenuBar.cpp | 2 ++ soh/src/code/z_en_item00.c | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp index efd34afb8..245aed98f 100644 --- a/soh/soh/SohMenuBar.cpp +++ b/soh/soh/SohMenuBar.cpp @@ -1017,6 +1017,8 @@ void DrawEnhancementsMenu() { UIWidgets::PaddedEnhancementCheckbox("Fix Poacher's Saw Softlock", "gFixSawSoftlock", true, false, CVarGetInteger("gSkipText", 0), "This is disabled because it is forced on when Skip Text is enabled.", UIWidgets::CheckboxGraphics::Checkmark); UIWidgets::Tooltip("Prevents the Poacher's Saw softlock from mashing through the text, or with Skip Text enabled."); + UIWidgets::PaddedEnhancementCheckbox("Fix Bush Item Drops", "gBushDropFix", true, false); + UIWidgets::Tooltip("Fixes the bushes to drop items correctly rather than spawning undefined items."); ImGui::EndMenu(); } diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index 22a03ea32..9d2b2dd74 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1753,7 +1753,11 @@ void Item_DropCollectibleRandom(PlayState* play, Actor* fromActor, Vec3f* spawnP } } } else { - Item_DropCollectible(play, spawnPos, params | 0x8000); + if (CVarGetInteger("gBushDropFix", 0)) { + Item_DropCollectible(play, spawnPos, dropId | 0x8000); + } else { + Item_DropCollectible(play, spawnPos, params | 0x8000); + } } dropQuantity--; }