From e26e1592be0404a7da01f9475fe31c399731a356 Mon Sep 17 00:00:00 2001 From: Silent Date: Mon, 13 May 2024 17:58:29 +0200 Subject: [PATCH] III: Steam Car Colour Fix From Sergenaur --- SilentPatchIII/SilentPatchIII.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/SilentPatchIII/SilentPatchIII.cpp b/SilentPatchIII/SilentPatchIII.cpp index 274c56c..0ef67d0 100644 --- a/SilentPatchIII/SilentPatchIII.cpp +++ b/SilentPatchIII/SilentPatchIII.cpp @@ -1748,6 +1748,21 @@ void Patch_III_Common() auto set_render_cb = get_pattern("55 E8 ? ? ? ? 89 D8 59", 1); Nop(set_render_cb, 5); } + + + // Fix dark car reflections in the Steam EXE + // Based off Sergenaur's fix + { + auto reflection = pattern("A1 ? ? ? ? 85 C0 74 34"); + if (reflection.count_hint(1).size() == 1) // This will only pass on the Steam EXE, and if Sergenaur's standalone fix isn't present + { + auto match = reflection.get_one(); + + // xor eax, eax \ nop + Patch(match.get(), { 0x31, 0xC0 }); + Nop(match.get(2), 3); + } + } } BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)