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

* Stop the despawn timer on demand

* But do make them disappear once they're collected!
This commit is contained in:
Josh Bodner 2022-06-09 14:28:58 -07:00 committed by GitHub
parent e39961dc4b
commit 257cc41d2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -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");

View File

@ -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)) {