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
This commit is contained in:
Silent 2024-09-21 13:31:25 +02:00
parent 590ec867db
commit 3bfeff1305
No known key found for this signature in database
GPG key ID: AE53149BB0C45AF1

View file

@ -611,20 +611,6 @@ namespace PickupEffectsFixes
retn 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 // Remove the glow from minigun2
auto minigun2Glow = get_pattern("8D 41 01 89 CB"); 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<void>(), 1);
InjectHook(pickupExtraObject.get<void>(1), &PickUpEffects_GiveUsAnObject, HookType::Call);
}
TXN_CATCH();
InjectHook(bigDollarColor, &PickUpEffects_BigDollarColor, HookType::Call); InjectHook(bigDollarColor, &PickUpEffects_BigDollarColor, HookType::Call);
InjectHook(minigun2Glow, &PickUpEffects_Minigun2Glow, HookType::Call); InjectHook(minigun2Glow, &PickUpEffects_Minigun2Glow, HookType::Call);
} }