From 21b537f5ec976e9768dce258cd0ad2d5f5c90d70 Mon Sep 17 00:00:00 2001 From: Silent Date: Tue, 16 Apr 2024 22:20:40 +0200 Subject: [PATCH] Fixed the muzzle flash facing the wrong direction Contributed by Wesser Fixes #9 --- SilentPatchVC/SilentPatchVC.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/SilentPatchVC/SilentPatchVC.cpp b/SilentPatchVC/SilentPatchVC.cpp index 99710fb..e6527ef 100644 --- a/SilentPatchVC/SilentPatchVC.cpp +++ b/SilentPatchVC/SilentPatchVC.cpp @@ -1467,6 +1467,18 @@ void Patch_VC_Common() InjectHook(bigDollarColor, &PickUpEffects_BigDollarColor, HookType::Call); InjectHook(minigun2Glow, &PickUpEffects_Minigun2Glow, HookType::Call); } + + + // Fixed the muzzle flash facing the wrong direction + // By Wesser + { + auto fireInstantHit = pattern("D9 44 24 50 D8 44 24 44").get_one(); + + // Replace fld [esp].vecSource with fldz, as vecEnd is already absolute + Patch(fireInstantHit.get(), { 0xD9, 0xEE, 0x90, 0x90 }); + Patch(fireInstantHit.get(15), { 0xD9, 0xEE, 0x90, 0x90 }); + Patch(fireInstantHit.get(30), { 0xD9, 0xEE, 0x90, 0x90 }); + } } BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)