From 09ee2f87eace4b3fd64d81ccfdb2c78ba663f6a6 Mon Sep 17 00:00:00 2001 From: Josh Bodner Date: Wed, 18 May 2022 22:32:21 -0700 Subject: [PATCH] Stop the despawn timer on demand --- libultraship/libultraship/SohImGuiImpl.cpp | 2 ++ soh/src/code/z_en_item00.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index d17d6ccee..35bd6f012 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -768,6 +768,8 @@ namespace SohImGui { Tooltip("Allows you to use any item at any location"); EnhancementCheckbox("Freeze Time", "gFreezeTime"); Tooltip("Freezes the time of day"); + EnhancementCheckbox("Drops Don't Despawn", "gDropsDontDie"); + Tooltip("Drops from enemies, grass, etc. don't disappear after a set amount of time"); ImGui::EndMenu(); } diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index d0179a5e1..5a25c45a8 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -894,7 +894,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { DroppedItemRot += 100; } - if (this->unk_15A > 0) { + if ((this->unk_15A > 0) && !CVar_GetS32("gDropsDontDie", 0)) { this->unk_15A--; }