summaryrefslogtreecommitdiffstats
path: root/src/hl2h.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-26 16:39:11 +0100
committersalmonik <salmonik@tuta.io>2026-10-26 16:39:11 +0100
commitccdcd4ad0483b98c9c20bd1304ad062ef8af3a4b (patch)
tree5a766a3b72ac442a4e7f1537afb07b6cb09e90bd /src/hl2h.cpp
parentESP: generic full-bone skeleton for non-humanoid NPCs (headcrabs, crows, ...) (diff)
downloadhl2h-ccdcd4ad0483b98c9c20bd1304ad062ef8af3a4b.tar.gz
hl2h-ccdcd4ad0483b98c9c20bd1304ad062ef8af3a4b.zip
Aimbot: head-only nearest-to-crosshair with bounded smoothing
- select the hostile NPC whose (approximate) head is closest in angle to the crosshair, then refine to its actual head hitbox/bone - aimbot menu feature (Active + Bind, default Mouse5, rebindable via the existing bind chooser); config [aimbot] active/bind - never snap: move at most 5 degrees per tick toward the target, shortest-path yaw, pitch clamped to +/-89, 0.05 degree deadzone; no overshoot/oscillation - fixes the usercmd CRC after modifying viewangles - skip when dead; ignores friendly/neutral entities (crows, citizens, ...)
Diffstat (limited to 'src/hl2h.cpp')
-rw-r--r--src/hl2h.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/hl2h.cpp b/src/hl2h.cpp
index b666585..21fa7ae 100644
--- a/src/hl2h.cpp
+++ b/src/hl2h.cpp
@@ -241,6 +241,13 @@ static void do_move(int seq) {
241 note_modified(cmd, flags, vel); 241 note_modified(cmd, flags, vel);
242 } 242 }
243 } 243 }
244
245 if (feature_active(FEAT_AIMBOT)) {
246 if (aimbot_apply(cmd)) {
247 const float *vel = (const float *)(e + g_net.velocity);
248 note_modified(cmd, flags, vel);
249 }
250 }
244} 251}
245 252
246// --------------------------------------------------------------------------- 253// ---------------------------------------------------------------------------