Skip to content

Commit

Permalink
improved multipoint accuracy and included a tolerance slider.
Browse files Browse the repository at this point in the history
  • Loading branch information
me committed Sep 10, 2023
1 parent 48dbe9f commit 8c26c6c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/core/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ int globals::monitorsizey = 1080;
bool globals::autoshoot = false;
float globals::smoothing = 0.1f;
bool globals::autostop = true;
float globals::pointScale = 0.75f;
std::vector<CVector> globals::aimbotPoints{};

void globals::UpdateLocalPlayer() noexcept
Expand Down
1 change: 1 addition & 0 deletions src/core/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ namespace globals
extern bool autoshoot;
extern float smoothing;
extern bool autostop;
extern float pointScale;
extern std::vector<CVector> aimbotPoints;

// update the local player pointer
Expand Down
5 changes: 4 additions & 1 deletion src/core/hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ void __stdcall hooks::PaintTraverse(uintptr_t vguiPanel, bool forceRepaint, bool
if (!player)
continue;

if (player == globals::localPlayer)
continue;

if (player->IsDormant() || !player->IsAlive())
continue;

Expand All @@ -151,7 +154,7 @@ void __stdcall hooks::PaintTraverse(uintptr_t vguiPanel, bool forceRepaint, bool
if (interfaces::debugOverlay->ScreenPosition(player->GetAbsOrigin() - CVector{ 0.f, 0.f, 9.f }, bottom))
continue;

hacks::hitboxPoints(globals::aimbotPoints, player, bones, HITBOX_HEAD, 0.85f);
hacks::hitboxPoints(globals::aimbotPoints, player, bones, HITBOX_HEAD, globals::pointScale);


const float h = bottom.y - top.y;
Expand Down
1 change: 1 addition & 0 deletions src/gui/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ void gui::Render() noexcept {
ImGui::SliderFloat("fraction (pseudo wallbang checker, turn down to shoot through walls)", &globals::frac, 0.f, 1.f);
ImGui::SliderFloat("smoothing", &globals::smoothing, 0, 1);
ImGui::SliderFloat("Minimum Accuracy", &globals::minaccuracy, 0.f, 500.f);
ImGui::SliderFloat("Aimpoint Tolerance", &globals::pointScale, 0.f, 0.85f);

ImGui::EndTabItem(); // End "Aimbot" tab
}
Expand Down
2 changes: 1 addition & 1 deletion src/hacks/aimbot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ void hacks::RunAimbot(CUserCmd* cmd) noexcept
if (!player->SetupBones(bones, 128, 256, interfaces::globals->currentTime))
continue;

hacks::hitboxPoints(globals::aimbotPoints, player, bones, HITBOX_HEAD, 0.85f);
hacks::hitboxPoints(globals::aimbotPoints, player, bones, HITBOX_HEAD, globals::pointScale);

// eye pos
CVector localEyePos;
Expand Down
4 changes: 2 additions & 2 deletions src/hacks/misc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ void hacks::hitboxPoints(std::vector<CVector>& points, CEntity* player, CMatrix3

const float rotation = 0.70710678f;

points.push_back(center);

// top/back 45 deg. Best place to shoot at
points.push_back({ hitbox->bbMax.x + (rotation * radius), hitbox->bbMax.y + (-rotation * radius), hitbox->bbMax.z });

Expand All @@ -140,8 +142,6 @@ void hacks::hitboxPoints(std::vector<CVector>& points, CEntity* player, CMatrix3
// back
points.push_back({ hitbox->bbMax.x, hitbox->bbMax.y - radius, hitbox->bbMax.z });

points.push_back(center);


}

Expand Down

0 comments on commit 8c26c6c

Please sign in to comment.