From d164e3373108d0c0f83452fbea22f8569b84eec6 Mon Sep 17 00:00:00 2001 From: salmonik Date: Mon, 26 Oct 2026 17:53:40 +0100 Subject: Docs/cleanup: refresh CONTEXT, update ISurface status, remove dead code - rewrite CONTEXT.md for the current architecture, interfaces, netvars, menu tree, bones/ESP, aimbot/vischeck, triggerbot, silent aim and ABH - update ISURFACE_STATUS.md: DrawLine slot, current menu/config path, 9 build TUs, current file layout - remove the stale root-level `tree` file - drop unused class_health_off/per-class health scan (NPC HP is not networked), surf_call_slot, and unused scancode helpers --- src/ISURFACE_STATUS.md | 36 +++++++++++++++++++++++------------- 1 file changed, 23 insertions(+), 13 deletions(-) (limited to 'src/ISURFACE_STATUS.md') diff --git a/src/ISURFACE_STATUS.md b/src/ISURFACE_STATUS.md index de952cd..00a7adf 100644 --- a/src/ISURFACE_STATUS.md +++ b/src/ISURFACE_STATUS.md @@ -1,13 +1,13 @@ # HL2hake ISurface Drawing — Status Report -## Date: 2026-09-12 (final round) +## Date: 2026-09-12, updated 2026-10-26 ## Result: WORKING Overlay drawing works in-game and in menus. Draw path: `PaintTraverseEx` hook (slot 114) on the copied ISurface vtable, wrapping our draws in `PushMakeCurrent(panel, false)` / `PopMakeCurrent(panel)` around ISurface -slots 6/10/12/17/18/20/22/66/67. +slots 6/10/12/15/17/18/20/22/66/67. ## Confirmed ISurface VTable Slots (disassembly-verified, binary=SDK header+4) @@ -18,6 +18,8 @@ slots 6/10/12/17/18/20/22/66/67. | 9 | `PopMakeCurrent(VPANEL)` | verified via disassembly | | 10 | `DrawSetColor(int r,g,b,a)` | stores RGBA at `this+0x24..0x27` | | 12 | `DrawFilledRect(int x0,y0,x1,y1)` | verified via disassembly | +| 14 | `DrawOutlinedRect(int x0,y0,x1,y1)` | SDK header 10 + 4 | +| 15 | `DrawLine(int x0,y0,x1,y1)` | SDK header 11 + 4 (skeleton ESP) | | 17 | `DrawSetTextFont(HFont)` | stores HFont at `this+0x290` | | 18 | `DrawSetTextColor(int r,g,b,a)` | stores RGBA at `this+0x28..0x2b` | | 20 | `DrawSetTextPos(int x,y)` | stores at `this+0x2c/0x30` | @@ -65,24 +67,27 @@ fc-match findings (system fontconfig): ## Menu -- Tree: HL2hake → Bunnyhop/ABH, children indented (`g_depth[]`, +12px/level). -- Right-aligned state at x=200: `[on]`/`[off]` for Active rows, - `[keyname]` for Bind rows, `[press key]` while binding. +- Starts fully collapsed on first open; `Insert` toggles it. +- Tree: HL2hake -> Bunnyhop (Active, Auto-strafe), ABH (Active), ESP (Active, + Show neutral/healthbar/healthnum/name/skeleton/box), Aimbot (Active, Bind, + Vischeck, Bones, Smoothness), Triggerbot (Active, Bind), Silent aim + (Active, Bind). Children indented by `g_depth[]` (+12px/level). +- Right-aligned state at x=270: `[on]`/`[off]` for toggles, `[keyname]` for + binds, `[press key]` while binding, `N deg/tick` for values. - Feature gating: `feature_active(int)` (menu.cpp) — active AND - (bind==0 or key held). Called from `do_move` (hl2h.cpp) to gate - bhop (jump) and ABH branches. -- Config: INI at `~/.hl2hake.ini` (bhop/abh active+bind). + (bind==0 or key held), used by `do_move` and the aim features. +- Config: `$XDG_CONFIG_HOME/hl2hake/config` (fallback `~/.config/hl2hake/config`). ## Build / Run -- `./build.sh`: g++ `-m32 -O2 -fPIC -shared`, links 5 TUs, `-ldl`, +- `./build.sh`: g++ `-m32 -O2 -std=c++17 -fPIC -shared`, 9 TUs + (`hl2h modules cinput netvars menu esp server bones vischeck`), `-ldl`, `-Wall -Wextra -Werror` (all warnings fatal). - `./play.sh -windowed +map d1_trainstation_01` (Steam runtime wrapper, `LD_PRELOAD=libhl2hake.so`). -- Logs: `/tmp/hl2hake.log` (logf), `/tmp/hl2run.log` (stderr). -- Probe logging (`hook fired:`, `probe:`) removed 2026-09-12. +- Logs: `/tmp/hl2hake.log` (logf), stderr. - `HL2H_DRAW_TEST=1` env: draws red rect + "HL2H DRAW TEST" without - opening the menu. + opening the menu. `HL2H_BONE_DEBUG=1` draws head-hitbox markers. ## Lessons @@ -98,7 +103,12 @@ fc-match findings (system fontconfig): ## File Locations - Project: `/home/salmon/Documents/rust/hl2h/` -- Hook + feature logic: `src/hl2h.cpp` +- Hook + movement/feature logic: `src/hl2h.cpp` - Menu + drawing + config + input: `src/menu.cpp` +- ESP / skeleton drawing / aimbot / silent aim: `src/esp.cpp` +- Bones + hitboxes: `src/bones.cpp` +- Server-side entity/health access: `src/server.cpp` +- World vischeck / entity trace: `src/vischeck.cpp` - Shared API: `src/hl2h.h` +- Current project overview: `CONTEXT.md` - SDK headers: `source-sdk-2013/src/public/vgui/` -- cgit v1.2.3