Fixed the muzzle flash facing the wrong direction

Contributed by Wesser

Fixes #9
This commit is contained in:
Silent 2024-04-16 22:20:40 +02:00
parent 78c03005fe
commit 21b537f5ec
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1

View File

@ -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<void>(), { 0xD9, 0xEE, 0x90, 0x90 });
Patch(fireInstantHit.get<void>(15), { 0xD9, 0xEE, 0x90, 0x90 });
Patch(fireInstantHit.get<void>(30), { 0xD9, 0xEE, 0x90, 0x90 });
}
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)