diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-28 12:24:10 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-28 12:24:10 +0100 |
| commit | 16546e5818408f35adc60c2d937cf4541ff7840a (patch) | |
| tree | 19c405c2c226e69f082d9465f9325c67bb1d0d92 /CONTEXT.md | |
| parent | Item ESP: recover CPhysicsProp model names from the server (diff) | |
| download | hl2h-16546e5818408f35adc60c2d937cf4541ff7840a.tar.gz hl2h-16546e5818408f35adc60c2d937cf4541ff7840a.zip | |
Logging: per-session file and debug-gated verbose logs
- Open /tmp/hl2hake.log once in the library constructor with "w" so each
session starts clean, use line buffering, flush each line, and close it via
atexit. No more fopen/fclose per message.
- Add logd() for verbose diagnostics, enabled only with HL2H_DEBUG=1.
- Move ESP/NPC scans, item-prop/item-classification logs, aimbot/silent-aim/
melee/triggerbot/spread details, jumpbug tracking, bone dumps, netvar dumps,
cmd-modified and ground-trace noise to logd().
- Keep logf() for lifecycle, config, warnings/errors, GUI open/close, item
category/tagging summaries and item-crate detections so crate debugging
works without the ESP stream.
- Supply crates now respect the max-distance slider (user change), with the
stale comment and CONTEXT updated.
- Document HL2H_DEBUG=1 in play.sh and CONTEXT.
Diffstat (limited to 'CONTEXT.md')
| -rw-r--r-- | CONTEXT.md | 14 |
1 files changed, 11 insertions, 3 deletions
| @@ -258,6 +258,15 @@ vocabulary / decisions. | |||
| 258 | assist deliberately writes only `m_vecAbsVelocity`; `SetAbsVelocity` syncs | 258 | assist deliberately writes only `m_vecAbsVelocity`; `SetAbsVelocity` syncs |
| 259 | `m_vecVelocity` after the command. | 259 | `m_vecVelocity` after the command. |
| 260 | 260 | ||
| 261 | ## Logging | ||
| 262 | |||
| 263 | - `/tmp/hl2hake.log` is opened once at startup with `"w"` (so it only contains | ||
| 264 | the current session), line-buffered, and closed via `atexit`. | ||
| 265 | - `logf` is always on: lifecycle, warnings/errors, config, GUI open/close and | ||
| 266 | item-crate detections. | ||
| 267 | - `logd` is off unless `HL2H_DEBUG=1`; it carries per-scan ESP/NPC/item-prop, | ||
| 268 | aimbot-target, bone and netvar noise. Run `HL2H_DEBUG=1 ./play.sh` to enable. | ||
| 269 | |||
| 261 | ## Gotchas / lessons | 270 | ## Gotchas / lessons |
| 262 | 271 | ||
| 263 | - Never pipe-mask build failures: | 272 | - Never pipe-mask build failures: |
| @@ -275,9 +284,8 @@ vocabulary / decisions. | |||
| 275 | - Scans the client entity list every 100 ms and tags health, ammo, armor/suit, | 284 | - Scans the client entity list every 100 ms and tags health, ammo, armor/suit, |
| 276 | world weapon pickups, the two supply-crate models and generic items. | 285 | world weapon pickups, the two supply-crate models and generic items. |
| 277 | - Each tag is a colored marker with a name and optional distance, filtered by | 286 | - Each tag is a colored marker with a name and optional distance, filtered by |
| 278 | category toggles and a max-distance slider (default 5000 units). Supply | 287 | category toggles and a max-distance slider (default 5000 units). Drawn |
| 279 | crates ignore the distance limit. Drawn through walls and independently of | 288 | through walls and independently of the hostile NPC ESP. |
| 280 | the hostile NPC ESP. | ||
| 281 | - Ammo labels are specific where the model is known: pistol, SMG, AR2, .357, | 289 | - Ammo labels are specific where the model is known: pistol, SMG, AR2, .357, |
| 282 | crossbow, shotgun, sniper, flares, AR2 grenade, RPG rocket, plus ammo-crate | 290 | crossbow, shotgun, sniper, flares, AR2 grenade, RPG rocket, plus ammo-crate |
| 283 | variants. Unknown ammo falls back to "Ammo". | 291 | variants. Unknown ammo falls back to "Ammo". |
