summaryrefslogtreecommitdiffstats
path: root/src/esp.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-03 22:03:01 +0100
committersalmonik <salmonik@tuta.io>2026-11-03 22:03:01 +0100
commit2e9373d530bca779b4070a79972f246ef41e4038 (patch)
treecc263d92cdcf7c9befd29f36da3cf04ed0b3a7f4 /src/esp.cpp
parentHandles: use the 11-bit networked EHANDLE entity index (diff)
downloadhl2h-2e9373d530bca779b4070a79972f246ef41e4038.tar.gz
hl2h-2e9373d530bca779b4070a79972f246ef41e4038.zip
GUI: recover invalid fonts; vischeck: props and bulletproof glass
- Validate the GUI font handles with GetTextSize and recreate them when the local player entity or UI scale changes. Small scaled sizes fall back to the proven 16 px size, and the failure log/toast is emitted once instead of every frame. This fixes sessions where the menu rendered with no text after a level transition. - Rework visibility: trace with MASK_SHOT/TRACE_EVERYTHING while ignoring the local player and target, so static props, crates and other NPCs block. Non-solid glass and breakable-glass materials are skipped; solid non-break glass (bulletproof) blocks. Fix CONTENTS_WINDOW 0x2 (was 0x4) in the masks. - Pass self/target to is_visible from aimbot/silent/melee callers.
Diffstat (limited to '')
-rw-r--r--src/esp.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/esp.cpp b/src/esp.cpp
index 3db25e6..5683704 100644
--- a/src/esp.cpp
+++ b/src/esp.cpp
@@ -541,7 +541,7 @@ static bool select_aim_target(const QAngle &view, unsigned bone_mask,
541 continue; 541 continue;
542 if (f >= best) 542 if (f >= best)
543 continue; 543 continue;
544 if (vischeck && !is_visible(g_cam_eye, pts[i])) 544 if (vischeck && !is_visible(g_cam_eye, pts[i], local_ent, ent))
545 continue; 545 continue;
546 best = f; 546 best = f;
547 best_pt = pts[i]; 547 best_pt = pts[i];
@@ -1061,7 +1061,7 @@ bool melee_aimbot_apply(CUserCmd *cmd) {
1061 float pd = vec_dist(g_cam_eye, pts[i]); 1061 float pd = vec_dist(g_cam_eye, pts[i]);
1062 if (pd > MELEE_RANGE || pd >= bestd) 1062 if (pd > MELEE_RANGE || pd >= bestd)
1063 continue; 1063 continue;
1064 if (!is_visible(g_cam_eye, pts[i])) 1064 if (!is_visible(g_cam_eye, pts[i], local_ent, tent))
1065 continue; 1065 continue;
1066 bestd = pd; 1066 bestd = pd;
1067 aim = pts[i]; 1067 aim = pts[i];
@@ -1083,7 +1083,7 @@ bool melee_aimbot_apply(CUserCmd *cmd) {
1083 if (ad > MELEE_RANGE) 1083 if (ad > MELEE_RANGE)
1084 aim = c.closest; 1084 aim = c.closest;
1085 } 1085 }
1086 if (!is_visible(g_cam_eye, aim)) 1086 if (!is_visible(g_cam_eye, aim, local_ent, tent))
1087 continue; 1087 continue;
1088 } 1088 }
1089 1089