File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,33 @@ void _declspec(naked) HOOK_Fx_AddBulletImpact()
200
200
}
201
201
}
202
202
203
+ // ////////////////////////////////////////////////////////////////////////////////////////
204
+ //
205
+ // CVisibilityPlugins::RenderWeaponPedsForPC
206
+ //
207
+ // Fix for the bright objects after weapon change sometimes
208
+ //
209
+ // ////////////////////////////////////////////////////////////////////////////////////////
210
+ #define HOOKPOS_CVisibilityPlugins_RenderWeaponPedsForPC 0x733123
211
+ #define HOOKSIZE_CVisibilityPlugins_RenderWeaponPedsForPC 5
212
+ static constexpr DWORD CONTINUE_CVisibilityPlugins_RenderWeaponPedsForPC = 0x733128 ;
213
+ static void _declspec (naked) HOOK_CVisibilityPlugins_RenderWeaponPedsForPC()
214
+ {
215
+ _asm
216
+ {
217
+ mov eax, 5DF4E0h
218
+ call eax // call CPed::ResetGunFlashAlpha
219
+
220
+ mov eax, 5533B0h
221
+ mov ecx, ebx
222
+
223
+ push 0
224
+ call eax // call CPed::RemoveLighting
225
+
226
+ jmp CONTINUE_CVisibilityPlugins_RenderWeaponPedsForPC
227
+ }
228
+ }
229
+
203
230
// ////////////////////////////////////////////////////////////////////////////////////////
204
231
//
205
232
// CMultiplayerSA::InitHooks_Weapons
@@ -212,4 +239,5 @@ void CMultiplayerSA::InitHooks_Weapons()
212
239
EZHookInstall (CWeapon_GenerateDamageEvent);
213
240
EZHookInstall (CShotInfo_Update);
214
241
EZHookInstall (Fx_AddBulletImpact);
242
+ EZHookInstall (CVisibilityPlugins_RenderWeaponPedsForPC);
215
243
}
You can’t perform that action at this time.
0 commit comments