From 074e315c8550712dce0c7b530a90eee6aca29e63 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 23:26:53 +0100 Subject: Add grenade trajectory, RPG armour priority, empty chargers, mega gravity gun - Projectiles gets a "Grenade trajectory" toggle. While a frag grenade is held, simulate the weapon_frag throw (1200 u/s forward + 120 z, player velocity, gravity 600) and trace each step with a new trace_solid_segment(); reflect on impact, stop on a slow upward-normal hit, and draw the path, landing cross and a 300-unit blast ring. Verified on :99 (arcs, bounces off the tunnel wall, lands). - With the RPG equipped, armoured NPCs (striders, gunships, dropships, hunter-choppers) sort before normal enemies during target acquisition. Added helicopter/chopper to the ARMORED model list. - Empty health/suit chargers are hidden: read m_iJuice from the server datamap (0 = depleted, -1 = unreadable/fail open). - The citadel supercharged gravity gun (d3_citadel_03, d3_citadel_04, d3_breen_01 via IVEngineClient::GetLevelName) is treated as a normal weapon, so the melee aimbot no longer restricts it to VULNERABLE NPCs. --- CONTEXT.md | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 1e860bf..889c3ab 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -201,9 +201,10 @@ vocabulary / decisions. - Every NPC is classified for ESP and target selection: - `IMMUNE` — server `m_takedamage` is `DAMAGE_NO`/`DAMAGE_EVENTS_ONLY`. - - `ARMORED` — gunship, strider, dropship: their `OnTakeDamage` only accepts - blast damage (`DMG_BLAST`, with a damage threshold on gunships and a - distance check on striders). Only the RPG passes; bullets/grenades do not. + - `ARMORED` — gunship, strider, dropship, hunter-chopper: their + `OnTakeDamage` only accepts blast damage (`DMG_BLAST`, with a damage + threshold on gunships and a distance check on striders). Only the RPG + passes; bullets/grenades do not. - `VULNERABLE` — headcrab, antlion, manhack: punting them with the gravity gun / physics impact damage kills them. - `NORMAL` — everything else. @@ -213,7 +214,10 @@ vocabulary / decisions. created at glyph size 10 alongside the 16 px body font (`g_font_small`). - Aimbot/silent aim/triggerbot/melee skip `IMMUNE` targets always and `ARMORED` targets unless the active weapon is the RPG - (`active_weapon_contains` for `rocket_launcher`/`rpg`). + (`active_weapon_contains` for `rocket_launcher`/`rpg`). With the RPG + equipped, armoured candidates are sorted before normal enemies (a + `fov - 1000` rank key), so a strider/gunship is acquired even when a normal + NPC is closer to the crosshair. - Server `m_takedamage` is a `char` in the 2013 SDK (`CNetworkVarForDerived(char, m_takedamage)`, `FIELD_CHARACTER`), so it is resolved with that type (int fallback) and read as a byte. `0/1` means no @@ -402,7 +406,11 @@ vocabulary / decisions. `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. + is a short physics punch. The citadel supercharges the gravity gun + (`d3_citadel_03`, `d3_citadel_04`, `d3_breen_01`; detected through + `IVEngineClient::GetLevelName`, slot 51), and there it is treated as a + normal weapon: the `VULNERABLE`-only filter is dropped, so any damageable + hostile NPC is selected. - 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 @@ -694,7 +702,10 @@ vocabulary / decisions. Reading at the raw offset shifted every count by one type (e.g. RPG read the buckshot count 30 against a max of 3, permanently hiding rockets). - Chargers and ammo/supply crates are dispensers and are exempt from the - fullness filter. + fullness filter. Empty health/suit chargers are still hidden: both + `CWallHealth` and `CNewRecharge` expose `m_iJuice` (server datamap + `FIELD_INTEGER`, resolved at offset 0x47c in this build), and a value of 0 + removes the charger tag until it recharges. `-1` (unreadable) 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 @@ -733,7 +744,17 @@ vocabulary / decisions. is a 24-segment horizontal circle projected at the projectile height, with every segment near-plane/screen clipped independently, so it still draws when the grenade itself is off-screen or behind the camera. - Toggles: Fuse timer, Blast radius. + Toggles: Fuse timer, Blast radius, Grenade trajectory + (`[projectiles] trajectory=1`). +- Grenade trajectory: while the frag weapon is active, simulate the throw + from `weapon_frag.cpp` (eye + forward*18 + right*8, player velocity + + (forward + 0.1 z)*1200), gravity 600, dt 0.02, restitution 0.35, friction + 0.35. Each step traces with `trace_solid_segment` (EngineTraceClient003 slot + 4, `MASK_PLAYERSOLID`, local player ignored); hits reflect about the impact + normal, and an upward normal with a slow vertical speed marks the landing. + The polyline, landing cross and a 300-unit blast-radius ring at the landing + are drawn with the same near-plane-clipped projector as the radius ring. + Verified on `:99` (the line arcs, bounces off a tunnel wall and lands). ## Roadmap / TODO -- cgit v1.2.3