From 10b8347d68c66701f3ef50fbf45157c71f149885 Mon Sep 17 00:00:00 2001 From: frknkrc44 Date: Mon, 18 Aug 2025 19:28:08 +0300 Subject: [PATCH] Do not reset chance time while in protected mode We can select the chance time before the PV starts while in protected mode, and we lose the chance time if restarted in the protected/PV mode. This code fixes the issue, and the chance time remains available. --- source-code/source/plugins/TLAC/Components/Pause.h | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/source-code/source/plugins/TLAC/Components/Pause.h b/source-code/source/plugins/TLAC/Components/Pause.h index 192f86c..899ce42 100644 --- a/source-code/source/plugins/TLAC/Components/Pause.h +++ b/source-code/source/plugins/TLAC/Components/Pause.h @@ -41,7 +41,7 @@ namespace TLAC::Components static void InjectCode(void* address, const std::vector data); static bool isPaused; // tracks internal state - + static void saveOldPatchOps(); static std::vector origAetMovOp; @@ -83,7 +83,7 @@ namespace TLAC::Components static const uint32_t bgLayer = 0x18; static const uint32_t contentLayer = 0x19; // same as startup screen - + static bool showUI; static int selResultAet1; @@ -94,7 +94,7 @@ namespace TLAC::Components static int squareAet; static int crossAet; static int circleAet; - + enum menusets { MENUSET_MAIN = 0, @@ -244,7 +244,12 @@ namespace TLAC::Components *(int*)0x140D0A9B8 = 0; // hold + multi *(int*)0x140D0A9C0 = 0; // slide *(uint8_t*)0x140D0A50C = 0; // not clear flag - *(char*)0x140D0AA0F = 0; // chance time + + // only reset chance time while in normal mode + if (!isInPV(false)) + { + *(char*)0x140D0AA0F = 0; // chance time + } // reset give up/end flags // because the code above doesn't reset them