From ccec960a0d53a740eb546a9523811e066a5f118a Mon Sep 17 00:00:00 2001 From: salmonik Date: Mon, 26 Oct 2026 16:46:37 +0100 Subject: Aimbot: fix eye height (m_vecViewOffset Z, not X); prefer head hitbox - g_cam_eye was adding the X component of m_vecViewOffset to Z, leaving the eye ~64 units too low; the aimbot consequently aimed above heads - head_position now prefers the HITGROUP_HEAD hitbox center before falling back to bone names (zombie: headcrab body hitbox) - log the exact head and desired angles for the first few aim ticks --- src/esp.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/esp.cpp') diff --git a/src/esp.cpp b/src/esp.cpp index bd3fbdb..2987508 100644 --- a/src/esp.cpp +++ b/src/esp.cpp @@ -417,15 +417,25 @@ bool aimbot_apply(CUserCmd *cmd) { } // Refine to the actual head hitbox/bone for the chosen target only. + bool exact_head = false; void *best_ent = entitylist_get(best_idx); if (best_ent && bones_update(best_idx, best_ent)) { Vector head; if (head_position(best_idx, head) && - getfov(view, angle_to(g_cam_eye, head)) <= MAX_FOV) + getfov(view, angle_to(g_cam_eye, head)) <= MAX_FOV) { best_head = head; + exact_head = true; + } } QAngle desired = angle_to(g_cam_eye, best_head); + static int want_logs = 0; + if (want_logs < 10) { + want_logs++; + logf("aimbot: head=(%.1f %.1f %.1f) exact=%d want=%.2f/%.2f", + best_head.x, best_head.y, best_head.z, (int)exact_head, desired.x, + desired.y); + } float dp = desired.x - cmd->viewangles[0]; float dy = desired.y - cmd->viewangles[1]; while (dy > 180.0f) dy -= 360.0f; -- cgit v1.2.3