From 714262bcf759a238daf906de16e7b204712a104f Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 14:28:21 +0100 Subject: Add usable item filter, projectile ESP and gravity-gun melee - Items: "Only if usable" hides health tags at full health and armor at full suit. Health ceiling is the server player's m_iMaxHealth; armor uses the server m_ArmorValue against HL2's 100 cap. Fails open when unreadable. - Projectiles: new Visuals feature/card for thrown grenades, RPG rockets, helicopter bombs and AR2 balls. Fuse from server m_flDetonateTime vs engine time; radius from m_DmgRadius with per-type fallback; optional 24-segment radius ring and FRAG timer label. - Melee: the killbot now handles the gravity gun as well; only VULNERABLE targets, 1200-unit range, primary attack to launch the held object, and no aim-punch compensation because the launch uses EyeVectors. - Server/netvars: m_ArmorValue, m_flDetonateTime, m_DmgRadius. --- CONTEXT.md | 42 +++++++++++++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 7 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 5c91b5c..96a4660 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -310,10 +310,16 @@ vocabulary / decisions. ## 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. +- Active only while the local player's active weapon is the crowbar or the + gravity gun. 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. +- With the gravity gun, only `VULNERABLE` targets (headcrab, antlion, + manhack) are selected, the range is 1200 units, and the attack button is + `IN_ATTACK`: the primary attack launches a held object along + `EyeVectors()`. No aim-punch compensation is applied there (EyeVectors does + not add punch); the crowbar path keeps it. Without a held object the primary + is a short physics punch. - Map transitions often switch the active weapon away from the crowbar. The state change is logged as `melee: active ... crowbar=0/1` (normal log), and a one-time toast says to equip the crowbar. If the client weapon model is @@ -328,9 +334,9 @@ vocabulary / decisions. 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. +- While either melee weapon 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). @@ -583,6 +589,11 @@ vocabulary / decisions. ## Valuable items - Visuals feature; Active is on by default and unbound (always-on). +- "Only if usable" (`[items] usable=1`) hides health pickups when the local + player is at full health and armor pickups at full suit. The health ceiling + is the server player's `m_iMaxHealth` (not a hardcoded 100); armor uses the + HL2 `MAX_NORMAL_BATTERY` cap of 100, read from the server + `m_ArmorValue`. If the values cannot be read the filter fails open. - Scans the client entity list every 100 ms and tags health, ammo, armor/suit, world weapon pickups, the two supply-crate models and generic items. - Each tag is a colored marker with a name and optional distance, filtered by @@ -601,6 +612,23 @@ vocabulary / decisions. item crates. The item scan falls back to the server entity's model index (`server_model_index`) to recover the model name. +## Projectile ESP + +- Visuals feature `g_projectiles` (`[projectiles]`, Active on, unbound). +- Scans the client entity list every 100 ms for world-model `w_grenade`, + `w_missile*`, `helicopter_bomb` and `combineball`. Weapon entities are + excluded by class (`...weapon...`); thrown grenades are recognised by + `CGrenadeFrag`-style class names or by an owner handle. +- Fuse: `CBaseGrenade::m_flDetonateTime` is not networked, so it is read from + the server entity datamap (`FIELD_TIME`) and compared with + `IVEngineClient::Time()` (slot 14). RPG rockets have no fuse. +- Blast radius: networked client `m_DmgRadius` when available, server + `m_DmgRadius` (`FIELD_FLOAT`) as fallback, then 300/200/150/300 for + frag/RPG/AR2/bomb. +- Draws a small marker and a `FRAG 1.2s`-style label; the optional radius ring + is a 24-segment horizontal circle projected at the projectile height. + Toggles: Fuse timer, Blast radius. + ## Roadmap / TODO - **Server-side spread/recoil control**: not planned; recoil and accuracy -- cgit v1.2.3