From 16546e5818408f35adc60c2d937cf4541ff7840a Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 28 Oct 2026 12:24:10 +0100 Subject: 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. --- src/vischeck.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vischeck.cpp') diff --git a/src/vischeck.cpp b/src/vischeck.cpp index 6d453c5..dcb5c3c 100644 --- a/src/vischeck.cpp +++ b/src/vischeck.cpp @@ -185,7 +185,7 @@ float ground_distance(const Vector &origin, void *ignore, float max_dist) { static int solid_logs = 0; if (tr.startsolid && solid_logs < 4) { solid_logs++; - logf("ground trace: startsolid at (%.1f %.1f %.1f)", origin.x, + logd("ground trace: startsolid at (%.1f %.1f %.1f)", origin.x, origin.y, origin.z); } return -1.0f; -- cgit v1.2.3