From 12fde50efc7e1f1d123f9fc34ffef53d4387de2d Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 13:53:45 +0100 Subject: Add ESP, aim, view and movement batch - ESP: alert state (IDLE/ALERT/COMBAT/SCRIPT), enemy weapon labels, hostile/ neutral/friendly colour pickers, off-screen direction arrows, and trigger_changelevel volumes with next/previous map labels. - Aim: silent aim reuses the Aimbot FOV, vischeck and bone settings; add optional aim-punch compensation for aimbot, silent aim, triggerbot and melee (server bullets add m_vecPunchAngle to the usercmd angles). - View: always-on Camera / display card with camera FOV (writes the client m_iDefaultFOV netvar), viewmodel FOV and monitor gamma (client cvars). - Movement: Jump assist card with auto crouch-jump and edge jump (point ground probe 0.12 s ahead). - Spread: Engine spread override toggle gates the direct RandomFloat zeroing; off leaves only the seed search. - Server: entity count/base/classname helpers, trigger_changelevel map name and world bounds via IServerUnknown/ICollideable. - Netvars: m_vecPunchAngle and m_iDefaultFOV. --- CONTEXT.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 68 insertions(+), 1 deletion(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 98eb7d0..2e1ce52 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -20,7 +20,9 @@ covers ESP, aimbot, triggerbot and silent aim. - `HL2H_BONE_DEBUG=1` — white marker at each NPC head hitbox. - `HL2H_NO_SERVER=1` — disable server-side health reads. - Config: `$XDG_CONFIG_HOME/hl2hake/config`, falling back to - `~/.config/hl2hake/config`. Plain INI, saved on every change. + `~/.config/hl2hake/config`. Plain INI, saved on every change. New sections: + `[view]` (camera FOV, viewmodel FOV, gamma x10) and `[movement]` + (crouch-jump, edge jump). ## Runtime architecture @@ -210,6 +212,48 @@ vocabulary / decisions. resolved with that type (int fallback) and read as a byte. `0/1` means no damage. +## ESP additions + +- Alert state: server `m_NPCState` is drawn as a second small left label + (`IDLE` grey, `ALERT` yellow, `COMBAT` red, `SCRIPT` blue). Toggle + `ESP -> Alert state` (`alert=1`). +- Enemy weapon: the NPC's server `m_hActiveWeapon` handle gives the weapon + entity, whose server model index is mapped to a short label (`SMG1`, `AR2`, + `Shotgun`, `RPG`, ...) with the client class name as fallback. Toggle + `ESP -> Enemy weapon` (`weapon=1`). +- Colours: hostile / neutral / friendly box, skeleton and name colours are + three `CK_COLOR` pickers in the ESP card (`hr/hg/hb`, `nr/ng/nb`, + `fr/fg/fb`). Health bars keep their semantic red/yellow/green. +- Off-screen arrows: hostiles whose head projection is outside the screen get + a chevron clamped to a 26 px margin; behind-the-camera targets use the + dot product with the view right vector. Toggle `ESP -> Off-screen arrows` + (`arrows=1`). +- Map transitions: see below. + +## Camera / display + +- The rendered camera FOV comes from `CViewRender::OnRenderStart` copying + `C_BasePlayer::m_iDefaultFOV` into `default_fov`, so the cheat writes the + client netvar each tick when `Camera FOV > 0` (0 = stock 75). +- `viewmodel_fov` and `mat_monitorgamma` are client cvars; applied through + `ClientCmd` when their slider changes. Gamma is stored as x10 + (`[view] gamma=22` = 2.2). Both live in the always-on + `Camera / display` card (`[view] fov/vmfov/gamma`). + +## Map transitions + +- Server-only brush entities: iterate `IVEngineServer::GetEntityCount` / + `PEntityOfEntIndex`, ask `IServerNetworkable::GetClassName` (slot 3) for + `trigger_changelevel`, read `CChangeLevel::m_szMapName` + (`FIELD_CHARACTER`, char[32]) as the next map, and get the volume from + `ICollideable::WorldSpaceSurroundingBounds` (slot 17, no virtual dtor; the + interface comes from `IServerUnknown::GetCollideable`, slot 4). +- The current map name comes from the worldspawn (`entity 0`) model name + (`maps/.bsp`). The map before the last change is kept as + `g_map_prev`, so the box label reads `-> next` and `prev `. +- Scanning runs at 4 Hz in the ESP draw; boxes are projected from their 8 + world corners and drawn as an orange outline with a 10 px label. + ## Bones / ESP - `SetupBones(BONE_USED_BY_ANYTHING)` with engine `Time()`; studio header via @@ -242,6 +286,13 @@ vocabulary / decisions. `CInput::CreateMove`, the minimal-spread seed is applied again in `do_move` (same for triggerbot). Crossbow bolts and RPG rockets are led by target velocity and travel time; the crossbow also gets its 0.05 gravity drop. +- Silent aim reuses the Aimbot FOV, vischeck and bone selection (it has no + separate FOV any more); only its bind and active flag are separate. +- Aim punch: the server's bullet direction is `EyeAngles() + + m_Local.m_vecPunchAngle` (`CBasePlayer::GetAutoaimVector`). When the new + "Compensate aim punch" toggle is on, the aim/silent/melee target angle has + the client `m_vecPunchAngle` subtracted, and the triggerbot traces along + `view + punch`, so the shot lands on the crosshair target during recoil. - ABH: on the landing/jump tick, face opposite the horizontal velocity with zero forward/side movement; HL2's jump speed-bound subtraction then accelerates along the velocity. Camera restored at `FRAME_RENDER_START`. @@ -298,6 +349,9 @@ vocabulary / decisions. `CBaseEntity::FireBullets`; the `CUniformRandomStream` wrappers and constructor-time `RandomSeed(0)` resets pass other objects and are left alone. +- `Spread control -> Engine spread override` (config `engine=1`) gates the + direct zeroing; when off, the RandomFloat hook passes through and only the + seed search is used. - Seed choice alone cannot remove all of a shotgun's pellet spread: the best of 256 sequences still leaves its 8/12 draws apart. `CShotManipulator:: ApplySpread` is inlined into `CBaseEntity::FireBullets` and draws x/y via @@ -316,6 +370,19 @@ vocabulary / decisions. single-player those can be written/hooked locally; stock HL2 has no distance damage falloff. +## Jump assist + +- **Auto crouch-jump** (`[movement] crouchjump`): while airborne with the + jump button still held and upward velocity, adds `IN_DUCK`; releases it once + the ascent ends. Only the bit we added is removed, so a player who holds + crouch keeps it. Bhop clears `IN_JUMP` in the air, so this applies to manual + jumps. +- **Edge jump** (`[movement] edgejump`): on ground, moving >120 u/s, probes a + point 0.12 s ahead with a downward `MASK_PLAYERSOLID` trace. No floor within + 96 units sets `IN_JUMP`. A startsolid probe (wall/step) counts as ground, so + running into walls does not bounce. Both are simple toggles, not features + with binds. + ## Jumpbug - Automatic while falling when the predicted landing speed -- cgit v1.2.3