From 293eda2bdce9d732fad168b5b6838bd89ce59fe8 Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 14:52:00 +0100 Subject: Melee killbot: 360-degree crowbar silent aim - New feature (default on): while the local player's active weapon is the crowbar, pick the nearest visible hostile NPC within the 75-unit crowbar range, sorted by distance to its collision AABB, and attack it through the normal silent-aim path (usercmd view + IN_ATTACK, movement preserved, rendered view restored at FRAME_RENDER_START). - Prefer the nearest visible hitbox center; fall back to the AABB center / closest point when bones are unavailable. Reuses the existing friendly / neutral and life-state filters and the world-only vischeck. - Detect the active weapon from the client m_hActiveWeapon handle, with the authoritative server m_hActiveWeapon handle as a fallback (client entity index from the low 16 bits). - While the crowbar is active and this feature is on, skip the gun aimbot, triggerbot and silent aim so they do not fight over the usercmd view. - Menu: Melee killbot -> Active; config [melee] active=... --- CONTEXT.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 38d9373..8fb2197 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -81,6 +81,7 @@ Relevant vtable slots (this build): | `m_lifeState` | `0x7F` | | `m_nModelIndex` | `0x7C` | | `m_vecAbsVelocity` (client local, not netvar) | `0x11C` | +| `m_hActiveWeapon` (client netvar; server fallback `0x824`) | resolved by name | - Eye position = `m_vecOrigin + m_vecViewOffset` on **all three axes**. (The old code added the X component to Z, which left the eye ~64 units low.) @@ -108,6 +109,8 @@ HL2hake Jumpbug Active Assist timing + Melee killbot + Active ESP Active Show neutral / healthbar / healthnum / name / skeleton / box / speed graph @@ -163,6 +166,26 @@ Binds use SDL scancodes; mouse buttons are pseudo-scancodes 600..604. zero forward/side movement; HL2's jump speed-bound subtraction then accelerates along the velocity. Camera restored at `FRAME_RENDER_START`. +## Melee killbot + +- Active only while the local player's active weapon is the crowbar. The + client `m_hActiveWeapon` handle is used first; if it is missing, the + authoritative server `m_hActiveWeapon` handle (0x824) is used to get the + weapon entity index. +- Crowbar range is `CROWBAR_RANGE` 75 units from `Weapon_ShootPosition`. The + selector computes the closest point on each hostile NPC's AABB to the eye, + rejects anything farther than 75, sorts by that distance, and picks the + nearest visible one. +- The usercmd view is pointed at the target for one command with `IN_ATTACK`; + movement keys are rotated with `preserve_movement`, and the rendered view is + restored immediately and at `FRAME_RENDER_START` (same silent-aim path). + This gives a 360-degree silent melee attack. +- While the crowbar is active and the killbot feature is on, the gun aimbot, + triggerbot and silent aim are skipped to avoid fighting over the usercmd + view. +- Vischeck uses the shared `MASK_VISIBLE`/world-only path (static props are + ignored). + ## Jumpbug - Automatic while falling when the predicted landing speed @@ -212,8 +235,6 @@ Binds use SDL scancodes; mouse buttons are pseudo-scancodes 600..604. ## Roadmap / TODO -- **Melee killbot**: 360° silent aim for hostile NPCs inside crowbar/melee - range, sorted by distance, only while the crowbar is held. - **GUI**: replace/augment the VGUI ISurface menu with an immediate-mode GUI (Dear ImGui or a custom implementation); needs a design grill first. - **Distance weapon spread thesis**: TBD — user will explain. Likely models -- cgit v1.2.3