From 5fa4b7dc4a6f70e522c8f6cb1a639aeabe62b8a6 Mon Sep 17 00:00:00 2001 From: ThirteenAG Date: Mon, 4 Nov 2024 23:35:30 +0800 Subject: [PATCH 1/2] fix plugin sdk compatibility --- source/frameratevigilante.ixx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/source/frameratevigilante.ixx b/source/frameratevigilante.ixx index d72347b3..c21b0f06 100644 --- a/source/frameratevigilante.ixx +++ b/source/frameratevigilante.ixx @@ -51,7 +51,7 @@ public: }; injector::MakeInline(pattern.get_first(0), pattern.get_first(6)); } - pattern = find_pattern("F3 0F 10 05 ? ? ? ? F3 0F 58 C1 F3 0F 11 05 ? ? ? ? EB 36", "F3 0F 10 05 ? ? ? ? F3 0F 58 05 ? ? ? ? F3 0F 11 05 ? ? ? ? EB 30"); + pattern = hook::pattern("F3 0F 10 05 ? ? ? ? F3 0F 58 C1 F3 0F 11 05 ? ? ? ? EB 36"); if (!pattern.empty()) { static auto f1032790 = *pattern.get_first(4); @@ -89,7 +89,7 @@ public: } // CD/busy spinner - pattern = find_pattern("F3 0F 58 05 ? ? ? ? 33 C0 A3 ? ? ? ? F3 0F 11 05"); + pattern = hook::pattern("F3 0F 58 05 ? ? ? ? 33 C0 A3 ? ? ? ? F3 0F 11 05"); if (!pattern.empty()) { struct CDSpinnerHook @@ -102,14 +102,11 @@ public: } // Cop blips - static int CustomFrameCounter = 0; - pattern = hook::pattern("A1 ? ? ? ? 6B C0 15"); - if (!pattern.empty()) - injector::WriteMemory(pattern.get_first(1), &CustomFrameCounter, true); - - pattern = hook::pattern("FF 05 ? ? ? ? F3 0F 2C C0"); + pattern = hook::pattern("F3 0F 10 4C 24 ? 0F 28 C1 F3 0F 59 C2"); if (!pattern.empty()) { + static int CustomFrameCounter = 0; + static auto CounterHook = safetyhook::create_mid(pattern.get_first(), [](SafetyHookContext& regs) { static float accumulator = 0.0f; @@ -118,6 +115,10 @@ public: CustomFrameCounter += increment; accumulator -= increment; }); + + pattern = hook::pattern("A1 ? ? ? ? 6B C0 15"); + if (!pattern.empty()) + injector::WriteMemory(pattern.get_first(1), &CustomFrameCounter, true); } }; } From a0cce46f7dd256edf3f91de918e86a04f4af56bb Mon Sep 17 00:00:00 2001 From: ThirteenAG Date: Mon, 4 Nov 2024 23:35:36 +0800 Subject: [PATCH 2/2] update submodules --- shaders/GTAIV.EFLC.FusionShaders | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shaders/GTAIV.EFLC.FusionShaders b/shaders/GTAIV.EFLC.FusionShaders index c36e2ac3..1a7823a7 160000 --- a/shaders/GTAIV.EFLC.FusionShaders +++ b/shaders/GTAIV.EFLC.FusionShaders @@ -1 +1 @@ -Subproject commit c36e2ac3d8b0d363ea2d1e920197d8da9d4db0da +Subproject commit 1a7823a76c84cbc24ed42ea0a86ea3ce9a96f0bf