Skip to content

Commit

Permalink
Merge branch 'master' into JsonParser
Browse files Browse the repository at this point in the history
  • Loading branch information
KarmaKoin authored Jan 3, 2025
2 parents e1e00f6 + ca7e916 commit 4555982
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
22 changes: 10 additions & 12 deletions Application/Modules/AimBotModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,19 @@ class AimBotModule : public Module
if (!target)
return;

// Empty the old states first (insure next check are actual)
GetAsyncKeyState(VK_RBUTTON);
// VK_XBUTTON1 (Mouse 4) only needs a 'toggle' (on/off)
const float doAim = config.isAimActive && GetKeyState(VK_XBUTTON1);

if (config.isAimActive && GetAsyncKeyState(VK_RBUTTON))
{
WriteClient<Vector3>(dwViewAngles, target->distance.RelativeAngle());
// VK_XBUTTON2 (Mouse 5) need a 'hold'
const float doShoot = config.isClickActive && MyLocalPlayer.crossIndex >= 0 && GetAsyncKeyState(VK_XBUTTON2) && GetAsyncKeyState(VK_XBUTTON2);

if (MyLocalPlayer.crossIndex < 0)
return;
if (doAim)
WriteClient<Vector3>(dwViewAngles, target->distance.RelativeAngle());

if (config.isClickActive)
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
}
if (doShoot)
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
}
}

Expand Down
2 changes: 1 addition & 1 deletion Application/Modules/EspModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ class EspModule : public Module
}

DrawRectangle(BORDER_POS, BORDER_D);
DrawTextual(player.screenBox.pStart + Position{0, -16}, player.name.data(), White50);
}

void RenderPlayerBox(Player &player)
Expand All @@ -78,7 +79,6 @@ class EspModule : public Module
return;

DrawRectangle(player.screenBox.pStart, player.screenBox.d, White50);
DrawTextual(player.screenBox.pStart + Position{0, -16}, player.name.data(), White50);
}

void RenderGameObjects(Player &player)
Expand Down

0 comments on commit 4555982

Please sign in to comment.