From ab3d725cacbe8cd7153c02faf2d9fe6df7e37949 Mon Sep 17 00:00:00 2001 From: salmonik Date: Mon, 26 Oct 2026 17:02:45 +0100 Subject: Aimbot v2: bone checklist and numeric smoothness - Aimbot -> Bones: Head, Torso (chest+stomach), Left/Right arm, Left/Right leg; the aimbot aims at the nearest selected hitbox point on the chosen target (head uses the head hitbox/bone fallback) - Aimbot -> Smoothness: value 1..45 deg/tick, Left/Right in the menu to adjust, persisted as smooth=N; default 5 (previous behaviour) - config: bone_* toggles + smooth under [aimbot] - menu gains a NODE_VALUE type (right-aligned value, Left/Right edit) --- src/bones.cpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/bones.cpp') diff --git a/src/bones.cpp b/src/bones.cpp index abcaac6..12c7406 100644 --- a/src/bones.cpp +++ b/src/bones.cpp @@ -460,3 +460,35 @@ bool head_position(int idx, Vector &out) { } return false; } + +// Collect world-space aim points for the selected hit groups (HITGROUP_*). +// Group 1 (head) uses head_position for its bone fallback; other groups are +// the hitbox centers. The caller picks the point nearest to the crosshair. +int aim_points(int idx, unsigned group_mask, Vector *out, int max) { + if (!out || max <= 0) + return 0; + BoneEntry *e = find_entry(idx); + if (!e || !e->valid || !e->hdr) + return 0; + int n = 0; + if ((group_mask & (1u << 1)) && n < max) { + Vector head; + if (head_position(idx, head)) + out[n++] = head; + } + const HitboxSet *s = hitbox_set0(e->hdr); + if (!s) + return n; + const Hitbox *boxes = hitboxes(s); + for (int i = 0; i < s->numhitboxes && n < max; i++) { + int g = boxes[i].group; + if (g <= 1 || g > 7) + continue; + if (!(group_mask & (1u << g))) + continue; + Vector p; + if (hitbox_world(e, boxes[i], p)) + out[n++] = p; + } + return n; +} -- cgit v1.2.3