summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Bodner <30329717+jbodner09@users.noreply.github.com>2022-06-09 14:28:58 -0700
committerGitHub <noreply@github.com>2022-06-09 17:28:58 -0400
commit257cc41d2b537e4a1ef2e6dd0cf6907380abf46d (patch)
tree7bb2b59c6e58d2683c5c4301d06ca2f72281a724
parente39961dc4b1f0380b9f9b5003439ec95e15b1910 (diff)
Stop the dropped item despawn timer on demand (#382)
* Stop the despawn timer on demand * But do make them disappear once they're collected!
-rw-r--r--libultraship/libultraship/SohImGuiImpl.cpp2
-rw-r--r--soh/src/code/z_en_item00.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp
index f6e41fb6e..f17a269be 100644
--- a/libultraship/libultraship/SohImGuiImpl.cpp
+++ b/libultraship/libultraship/SohImGuiImpl.cpp
@@ -1053,6 +1053,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");
EnhancementCheckbox("Fireproof Deku Shield", "gFireproofDekuShield");
Tooltip("Prevents the Deku Shield from burning on contact with fire");
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c
index d0179a5e1..a7de67900 100644
--- a/soh/src/code/z_en_item00.c
+++ b/soh/src/code/z_en_item00.c
@@ -896,6 +896,9 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_15A > 0) {
this->unk_15A--;
+ if (CVar_GetS32("gDropsDontDie", 0) && (this->unk_154 <= 0)) {
+ this->unk_15A++;
+ }
}
if ((this->unk_15A > 0) && (this->unk_15A < 41) && (this->unk_154 <= 0)) {