From 80a287910f3f77519c8243ba5f53d9c877fbddcb Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 4 Nov 2026 23:32:00 +0100 Subject: Charger juice: resolve per-class offsets CWallHealth derives CBaseToggle and CNewRecharge derives CBaseAnimating, so m_iJuice is at different offsets (0x3c8 and 0x47c here). Collect every m_iJuice datamap match, derive the suit offset from m_iMaxJuice-20, and pick by the server class name. Also detect health brushes via wallhealth/recharge rather than the ESP label. Verified the offsets resolve distinctly on :99. --- CONTEXT.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 889c3ab..d0f89cb 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -703,9 +703,12 @@ vocabulary / decisions. 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. 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. + `CWallHealth` (health brush) and `CNewRecharge` (suit charger) expose + `m_iJuice`, but at different offsets because their bases differ + (`CBaseToggle` vs `CBaseAnimating`). `datamap_offsets` collects every match; + the suit offset is `m_iMaxJuice - 20` and the health offset is the other + `m_iJuice` match (0x47c / 0x3c8 in this build). `server_item_juice` picks + by the server class name. 0 removes the tag; -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 -- cgit v1.2.3