From 2065269af63cdb766d7396bcba48f7571a54ef46 Mon Sep 17 00:00:00 2001 From: Emmanuel AYME Date: Sat, 14 Feb 2026 10:08:30 +0100 Subject: [PATCH] Updated fog fix. Logs improvement --- Reanimal/dllmain.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Reanimal/dllmain.cpp b/Reanimal/dllmain.cpp index cb5000b..47c075f 100644 --- a/Reanimal/dllmain.cpp +++ b/Reanimal/dllmain.cpp @@ -81,22 +81,21 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) { constexpr auto DOFStringObfuscated = make_obfuscated<0xC1>("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 6B ?? ?? 48 8D"); constexpr auto CAStringObfuscated = make_obfuscated<0x39>("7F ?? 44 89 ?? ?? ?? ?? ?? 43 8B ?? ?? 39 05 ?? ?? ?? ?? 0F 8F"); constexpr auto VignettingStringObfuscated = make_obfuscated<0xEB>("8B ?? 83 ?? ?? 7D ?? 44 89 ?? ?? ?? ?? ?? EB"); - constexpr auto FogStringObfuscated = make_obfuscated<0x75>("74 ?? 48 8B ?? ?? ?? ?? ?? 83 ?? ?? ?? 75 ?? 40 ?? ?? EB ?? 40 ?? ?? 48"); + constexpr auto FogStringObfuscated = make_obfuscated<0x75>("74 ?? 48 8B ?? ?? ?? ?? ?? 83 ?? ?? ?? 75 ?? B3 ?? EB ?? 32 ?? 48 8B ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 84"); constexpr auto WorldTimeDilationStringObfuscated = make_obfuscated<0x59>("F3 0F 10 ?? ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? C3"); constexpr auto CameraStruct1StringObfuscated = make_obfuscated<0x48>("48 89 ?? ?? ?? 57 48 83 ?? ?? 0F ?? ?? 48 8B FA 48 ?? ?? 0F ?? ?? F2 0F 10"); - constexpr auto CameraStruct2StringObfuscated = make_obfuscated<0xFA>("48 89 ?? ?? ?? 57 48 83 ?? ?? 0F 10 ?? 48 8B ?? 48 8B FA 0F ?? ?? F2 0F 10 ?? ?? F2 0F 11 ?? ?? 0F 10 ?? ?? 0F 11 ?? ?? F2 0F 10 ?? ?? F2 0F 11 ?? ?? 8B"); using AOBScan::Make; using OffsetScan::Make; // Prepare all data for scanning std::vector signatures = { Make(&FOVaddress, FOVStringObfuscated, "FOV"), + Make(&CameraStruct1address, CameraStruct1StringObfuscated, "Camera"), Make(&DOFaddress, DOFStringObfuscated, "DOF"), Make(&CAaddress, CAStringObfuscated, "Chromatic aberrations"), Make(&Vignettingaddress, VignettingStringObfuscated, "Vignetting"), Make(&Fogaddress, FogStringObfuscated, "Fog"), - Make(&WorldTimedilationaddress, WorldTimeDilationStringObfuscated, "World time dilation"), - Make(&CameraStruct1address, CameraStruct1StringObfuscated, "Camera") + Make(&WorldTimedilationaddress, WorldTimeDilationStringObfuscated, "World time dilation") }; // Scan all signature in a batch Memory::AOBScanBatch(signatures, logger); @@ -126,7 +125,7 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) { AOBScanDone = true; } - if (!init && FOVaddress) UltraWideFixEnabled(GameFixes::FOV); + if (!init && FOVaddress) FOVFixEnabled(); if (!init && CameraStruct1address) UltraWideFixEnabled(GameFixes::UltraWide); if (!init && DOFaddress) DOFFixEnabled(); if (!init && CAaddress) CAFixEnabled(); @@ -187,7 +186,7 @@ static void ProcessEvent() { } static void FOVFixEnabled() { - if (g_fix_enabled && (g_fov_fix_enabled || g_ultrawide_fix_enabled) && FOVaddress) { + if (FOVaddress) { if (!FOVHook) { // Hook only once FOVHook = safetyhook::create_mid(FOVaddress + 0x10, [](SafetyHookContext& ctx) { @@ -200,7 +199,7 @@ static void FOVFixEnabled() { }); } } - logger->info("FOV fix {}", g_fov_fix_enabled ? "enabled" : "disabled"); + logger->info("FOV fix {}", g_fix_enabled && g_fov_fix_enabled ? "enabled" : "disabled"); } static void UltraWideFixEnabled(GameFixes fix) { @@ -221,7 +220,7 @@ static void UltraWideFixEnabled(GameFixes fix) { } }); } - logger->info("Ultrawide fix {}", g_ultrawide_fix_enabled ? "enabled" : "disabled"); + logger->info("Ultrawide fix {}", g_fix_enabled && g_ultrawide_fix_enabled ? "enabled" : "disabled"); } // Cheats