From a5d732920bd56c96e85db1ce2073bebf53e6b1ea Mon Sep 17 00:00:00 2001 From: salmonik Date: Thu, 5 Nov 2026 18:09:43 +0100 Subject: Items: keep health chargers visible, add charger diagnostics The health charger's candidate m_iJuice offset (0x3c8) read 0 on a full charger, so the empty-hide made health chargers disappear entirely. Restrict the hide to suit chargers (verified 0x47c) until the health offset is confirmed; health chargers stay visible. Classify with the server class name when the client class is generic, accept `healthcharger` in the health branch (maps use item_healthcharger / CNewWallHealth, not the func_healthcharger brush), and log up to eight `juice:` lines with the class and both candidate offsets/values. --- CONTEXT.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index 54ca0b4..8ff833c 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -702,13 +702,16 @@ 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. Empty health/suit chargers are still hidden: both - `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. + fullness filter. Empty **suit** chargers are hidden (`CNewRecharge` + `m_iJuice` at 0x47c, derived from `m_iMaxJuice - 20`; 0 = depleted, -1 + unreadable fails open). Health chargers are currently left visible: their + candidate `m_iJuice` offset (0x3c8 for `CWallHealth`/`CNewWallHealth`) read 0 + on a full charger, so the empty-hide is not trusted yet. + `server_item_juice` logs up to eight `juice:` lines with the class and both + candidate values to finish diagnosing this. Item classification also falls + back to the server class name when the client class is generic, and the + health branch accepts `healthcharger` (maps use `item_healthcharger`, + i.e. `CNewWallHealth`, not the `func_healthcharger` brush). - 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