From d01d6ff3d1f9a057b317050a88150693722a6ae9 Mon Sep 17 00:00:00 2001 From: vaguerant Date: Tue, 7 Jun 2022 09:26:16 +1000 Subject: [PATCH] Add Fireproof Deku Shield cheat (#440) --- libultraship/libultraship/SohImGuiImpl.cpp | 2 ++ soh/src/overlays/actors/ovl_player_actor/z_player.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index f2a69c381..104d300bc 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -1041,6 +1041,8 @@ namespace SohImGui { Tooltip("Allows you to use any item at any location"); EnhancementCheckbox("Freeze Time", "gFreezeTime"); Tooltip("Freezes the time of day"); + EnhancementCheckbox("Fireproof Deku Shield", "gFireproofDekuShield"); + Tooltip("Prevents the Deku Shield from burning on contact with fire"); ImGui::EndMenu(); } diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c index d6154bfde..804d4032a 100644 --- a/soh/src/overlays/actors/ovl_player_actor/z_player.c +++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c @@ -3707,7 +3707,7 @@ s32 func_8083816C(s32 arg0) { } void func_8083819C(Player* this, GlobalContext* globalCtx) { - if (this->currentShield == PLAYER_SHIELD_DEKU) { + if (this->currentShield == PLAYER_SHIELD_DEKU && (CVar_GetS32("gFireproofDekuShield", 0) == 0)) { Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_ITEM_SHIELD, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 1); Inventory_DeleteEquipment(globalCtx, EQUIP_SHIELD);