From 3bfeff1305088ef73b0419ab1a5ac57a2e633648 Mon Sep 17 00:00:00 2001 From: Silent Date: Sat, 21 Sep 2024 13:31:25 +0200 Subject: [PATCH] VC: Removed the fix for grenade spawning inside a detonator It's a very minor visual issue, and it was causing a bug where the grenade model was not loaded when picking the pickup up, and crashed upon trying to throw it. Not worth the risk keeping this change --- SilentPatchVC/SilentPatchVC.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) diff --git a/SilentPatchVC/SilentPatchVC.cpp b/SilentPatchVC/SilentPatchVC.cpp index ca53174..8d956d3 100644 --- a/SilentPatchVC/SilentPatchVC.cpp +++ b/SilentPatchVC/SilentPatchVC.cpp @@ -611,20 +611,6 @@ namespace PickupEffectsFixes retn } } - - __declspec(naked) static void PickUpEffects_GiveUsAnObject() - { - _asm - { - jnz GiveUsAnObject_NotEqual - mov si, [eax+58h] - retn - - GiveUsAnObject_NotEqual: - mov si, -1 - retn - } - } } @@ -1786,17 +1772,6 @@ void Patch_VC_Common() // Remove the glow from minigun2 auto minigun2Glow = get_pattern("8D 41 01 89 CB"); - // Don't spawn the grenade together with the detonator in the pickup - // FLA might be altering this due to the usage of 16-bit IDs? Just in case allow for graceful failure - try - { - auto pickupExtraObject = pattern("75 04 66 8B 70 58").get_one(); - - Nop(pickupExtraObject.get(), 1); - InjectHook(pickupExtraObject.get(1), &PickUpEffects_GiveUsAnObject, HookType::Call); - } - TXN_CATCH(); - InjectHook(bigDollarColor, &PickUpEffects_BigDollarColor, HookType::Call); InjectHook(minigun2Glow, &PickUpEffects_Minigun2Glow, HookType::Call); }