Skip to content

Commit

Permalink
Fix bad hook on CG_EntityEvents_Stub
Browse files Browse the repository at this point in the history
  • Loading branch information
Laupetin committed Sep 30, 2024
1 parent ec4d284 commit 22f3874
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/Components/Modules/Rumble.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1100,26 +1100,21 @@ namespace Components
call CG_EntityEvents_Hk

add esp, 8
mov[esp + 0x28], eax
popad

mov eax, [esp + 0x8]
mov[esp + 0x20], eax

popad
pop eax

test al, al
jz processCgEvents

// End procedure for CG_EntityEvents
pop eax

push 0x4DED0A
retn

processCgEvents :
pop eax

// original code
mov edx, 0x9F5CE4
mov edx, [0x9F5CE4]

// go back
push 0x4DCF8A
Expand Down Expand Up @@ -1305,6 +1300,8 @@ namespace Components
// Parse CG_EntityEvents for new events
Utils::Hook(0x4DCF84, CG_EntityEvents_Stub, HOOK_JUMP).install()->quick();

MessageBoxA(NULL, "", "", 0);

// CG_setRumbleReceiver
Utils::Hook(0x486DEC, CG_SetRumbleReceiver, HOOK_CALL).install()->quick();

Expand Down

0 comments on commit 22f3874

Please sign in to comment.