Browse Source

Stop the dropped item despawn timer on demand (#382)

* Stop the despawn timer on demand

* But do make them disappear once they're collected!
pull/465/head
Josh Bodner 2 months ago committed by GitHub
parent
commit
257cc41d2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      libultraship/libultraship/SohImGuiImpl.cpp
  2. 3
      soh/src/code/z_en_item00.c

2
libultraship/libultraship/SohImGuiImpl.cpp

@ -1053,6 +1053,8 @@ namespace SohImGui { @@ -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");

3
soh/src/code/z_en_item00.c

@ -896,6 +896,9 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { @@ -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)) {

Loading…
Cancel
Save