Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
i dont want to but i need because i want to pr latest update
  • Loading branch information
s0t7x committed Feb 8, 2025
2 parents 1639e5f + 3736947 commit 473f149
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions example-mods/first_person_view/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class FirstPersonMod : public Mod
public:
void Load(ModContext* modContext)
{
const char* pattern = "\xF3\x0F\x11\x9F\x2C\x07\x00\x00";
// F3 0F 11 9F C4 06 00 00
const char* pattern = "\xF3\x0F\x11\x9F\xC4\x06\x00\x00";
const char* mask = "xxxxxxxx";

uintptr_t baseAddress = (uintptr_t)GetModuleHandle(NULL);
Expand All @@ -30,9 +31,9 @@ class FirstPersonMod : public Mod
if (address)
{
uint8_t modCode[] = {
0xF3,0x0F,0x11,0x9F,0x2C,0x07,0x00,0x00,
0xC7,0x87,0x2C,0x07,0x00,0x00,0x00,0x00,0x00,0x00,
0xC7,0x87,0x30,0x07,0x00,0x00,0x00,0x00,0x80,0xBF,
0xF3,0x0F,0x11,0x9F,0xC4,0x06,0x00,0x00,
0xC7,0x87,0xC4,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
0xC7,0x87,0xC8,0x06,0x00,0x00,0x00,0x00,0x80,0xBF,
0xE9,0x00,0x00,0x00,0x00
};
mod = new Mem::Detour(address, modCode, sizeof(modCode), false, 3);
Expand Down

0 comments on commit 473f149

Please sign in to comment.