Skip to content

Commit

Permalink
aim zoom pad fix
Browse files Browse the repository at this point in the history
- fixes #477
  • Loading branch information
ThirteenAG committed Apr 20, 2024
1 parent 86142fe commit 05ade5d
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion source/fixes.ixx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public:
*(uint8_t*)(regs.esi + 0x200) |= 1;
byte_F47AB1 = 1;
}
};
};
if (!pattern.empty())
injector::MakeInline<AimZoomHook1>(pattern.get_first(0), pattern.get_first(7));
else {
Expand Down Expand Up @@ -108,6 +108,20 @@ public:
pattern = hook::pattern("88 1D ? ? ? ? 74 10");
injector::WriteMemory<uint8_t>(pattern.get_first(1), 0x25, true); //mov ah
}

//gamepad handler
pattern = find_pattern("88 8E ? ? ? ? 84 DB");
if (!pattern.empty())
{
struct AimZoomHook3
{
void operator()(injector::reg_pack& regs)
{
*(uint8_t*)(regs.esi + 0x200) = regs.ecx & 0xFF;
byte_F47AB1 = *(uint8_t*)(regs.esi + 0x200);
}
}; injector::MakeInline<AimZoomHook3>(pattern.get_first(0), pattern.get_first(6));
}
}

if (bRecoilFix)
Expand Down

0 comments on commit 05ade5d

Please sign in to comment.