From 5e8258ff07ef4fdaddd45ad1965565d91b0c2d54 Mon Sep 17 00:00:00 2001 From: stratomaster64 Date: Wed, 27 Apr 2022 22:03:56 -0400 Subject: [PATCH] readded cheats to menu; fixed bug with freezing time --- libultraship/libultraship/SohImGuiImpl.cpp | 15 +++++++++++++++ soh/src/code/game.c | 2 ++ 2 files changed, 17 insertions(+) diff --git a/libultraship/libultraship/SohImGuiImpl.cpp b/libultraship/libultraship/SohImGuiImpl.cpp index 5111a0d6d..a1faea19b 100644 --- a/libultraship/libultraship/SohImGuiImpl.cpp +++ b/libultraship/libultraship/SohImGuiImpl.cpp @@ -605,6 +605,21 @@ namespace SohImGui { CVar_SetS32("gSuperTunic", Game::Settings.cheats.super_tunic); needs_save = true; } + + if (ImGui::Checkbox("Easy ISG", &Game::Settings.cheats.ez_isg)) { + CVar_SetS32("gEzISG", Game::Settings.cheats.ez_isg); + needs_save = true; + } + + if (ImGui::Checkbox("Unrestricted Items", &Game::Settings.cheats.no_restrict_item)) { + CVar_SetS32("gNoRestrictItem", Game::Settings.cheats.no_restrict_item); + needs_save = true; + } + + if (ImGui::Checkbox("Freeze Time", &Game::Settings.cheats.freeze_time)) { + CVar_SetS32("gFreezeTime", Game::Settings.cheats.freeze_time); + needs_save = true; + } } if (ImGui::BeginMenu("Cosmetics")) { diff --git a/soh/src/code/game.c b/soh/src/code/game.c index b69537fd8..97c3a3854 100644 --- a/soh/src/code/game.c +++ b/soh/src/code/game.c @@ -421,6 +421,8 @@ void GameState_Update(GameState* gameState) { int32_t prevTime = CVar_GetS32("gPrevTime", gSaveContext.dayTime); gSaveContext.dayTime = prevTime; + } else { + CVar_SetS32("gPrevTime", -1); }