From 0b7137b8b058e83c070c7d367a94160d116ae679 Mon Sep 17 00:00:00 2001 From: vaguerant Date: Wed, 6 Jul 2022 09:30:17 +1000 Subject: [PATCH] Cheat: Infinite Epona Boost (#577) * Cheat: Infinite Epona Boost * Edit for readability --- libultraship/libultraship/ImGuiImpl.cpp | 1 + soh/src/code/z_parameter.c | 2 +- soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libultraship/libultraship/ImGuiImpl.cpp b/libultraship/libultraship/ImGuiImpl.cpp index c85550fdd..94227e5ee 100644 --- a/libultraship/libultraship/ImGuiImpl.cpp +++ b/libultraship/libultraship/ImGuiImpl.cpp @@ -1165,6 +1165,7 @@ namespace SohImGui { EnhancementCheckbox("Ammo", "gInfiniteAmmo"); EnhancementCheckbox("Magic", "gInfiniteMagic"); EnhancementCheckbox("Nayru's Love", "gInfiniteNayru"); + EnhancementCheckbox("Epona Boost", "gInfiniteEpona"); ImGui::EndMenu(); } diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c index 716dfacd1..f9669b3aa 100644 --- a/soh/src/code/z_parameter.c +++ b/soh/src/code/z_parameter.c @@ -3868,7 +3868,7 @@ void Interface_Draw(GlobalContext* globalCtx) { if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.debugState == 0)) { if (gSaveContext.minigameState != 1) { // Carrots rendering if the action corresponds to riding a horse - if (interfaceCtx->unk_1EE == 8) { + if (interfaceCtx->unk_1EE == 8 && !CVar_GetS32("gInfiniteEpona", 0)) { // Load Carrot Icon gDPLoadTextureBlock(OVERLAY_DISP++, gCarrotIconTex, G_IM_FMT_RGBA, G_IM_SIZ_32b, 16, 16, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, diff --git a/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 79e54b063..c1870752c 100644 --- a/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/soh/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -3312,7 +3312,7 @@ void EnHorse_CheckBoost(EnHorse* thisx, GlobalContext* globalCtx2) { this->stateFlags |= ENHORSE_BOOST; this->stateFlags |= ENHORSE_FIRST_BOOST_REGEN; this->stateFlags |= ENHORSE_FLAG_8; - this->numBoosts--; + if (!CVar_GetS32("gInfiniteEpona", 0)) { this->numBoosts--; } this->boostTimer = 0; if (this->numBoosts == 0) { this->boostRegenTime = 140;