Skip to content

Commit

Permalink
fixed a bug in infinite stamina not working with double jumps
Browse files Browse the repository at this point in the history
  • Loading branch information
s0t7x committed Feb 8, 2025
1 parent 473f149 commit 0c66196
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions example-mods/basics_mod/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ class NoStaminaLoss : public _Mod
{
// The modded code that will replace the original instructions at the found address.
uint8_t modCode[] = {
0x8B, 0x04, 0x81, // mov eax, [rcx+rax*4]
0x89, 0x44, 0x24, 0x3C, // mov [rsp+3C], eax
0x89, 0x44, 0x24, 0x40, // mov [rsp+40], eax
0xE9, 0x00, 0x00, 0x00, 0x00 // jmp return
0xC7, 0x04, 0x81, 0x01, 0x00, 0x00, 0x00, // mov[rcx + rax * 4],00000001 { 1 }
0x8B, 0x04, 0x81, // mov eax, [rcx+rax*4]
0x89, 0x44, 0x24, 0x3C, // mov [rsp+3C], eax
0x89, 0x44, 0x24, 0x40, // mov [rsp+40], eax
0xE9, 0x00, 0x00, 0x00, 0x00 // jmp return
};

// Creating the detour by replacing the original code with our custom modCode.
Expand Down

0 comments on commit 0c66196

Please sign in to comment.