summaryrefslogtreecommitdiffstats
path: root/src/vischeck.cpp
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-11-04 13:53:45 +0100
committersalmonik <salmonik@tuta.io>2026-11-04 13:53:45 +0100
commit12fde50efc7e1f1d123f9fc34ffef53d4387de2d (patch)
tree4de53807ce23df9b63598a0e3a12620ff19eb7cc /src/vischeck.cpp
parentNo spread: detect pellet draws from the FireBullets seed call (diff)
downloadhl2h-12fde50efc7e1f1d123f9fc34ffef53d4387de2d.tar.gz
hl2h-12fde50efc7e1f1d123f9fc34ffef53d4387de2d.zip
Add ESP, aim, view and movement batch
- ESP: alert state (IDLE/ALERT/COMBAT/SCRIPT), enemy weapon labels, hostile/ neutral/friendly colour pickers, off-screen direction arrows, and trigger_changelevel volumes with next/previous map labels. - Aim: silent aim reuses the Aimbot FOV, vischeck and bone settings; add optional aim-punch compensation for aimbot, silent aim, triggerbot and melee (server bullets add m_vecPunchAngle to the usercmd angles). - View: always-on Camera / display card with camera FOV (writes the client m_iDefaultFOV netvar), viewmodel FOV and monitor gamma (client cvars). - Movement: Jump assist card with auto crouch-jump and edge jump (point ground probe 0.12 s ahead). - Spread: Engine spread override toggle gates the direct RandomFloat zeroing; off leaves only the seed search. - Server: entity count/base/classname helpers, trigger_changelevel map name and world bounds via IServerUnknown/ICollideable. - Netvars: m_vecPunchAngle and m_iDefaultFOV.
Diffstat (limited to '')
-rw-r--r--src/vischeck.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vischeck.cpp b/src/vischeck.cpp
index 97a2c12..c8c0942 100644
--- a/src/vischeck.cpp
+++ b/src/vischeck.cpp
@@ -232,6 +232,26 @@ void *trace_entity(const Vector &start, const Vector &end, void *ignore) {
232 return tr.ent; 232 return tr.ent;
233} 233}
234 234
235// True when a downward point trace from just above `point` finds a standable
236// surface. Used by edge jump: a ledge has no floor within the probe, slopes and
237// stairs do.
238bool point_ground(const Vector &point, void *ignore) {
239 if (!g_iface.enginetrace)
240 return false;
241 RayCompat ray;
242 Vector start{point.x, point.y, point.z + 4.0f};
243 Vector end{point.x, point.y, point.z - 96.0f};
244 make_ray(ray, start, end);
245 GameTraceCompat tr{};
246 EntityFilter filter(ignore);
247 using TraceRayFn = void (*)(void *, const RayCompat *, unsigned, void *,
248 GameTraceCompat *);
249 vfunc<TraceRayFn>(g_iface.enginetrace, 4)(g_iface.enginetrace, &ray,
250 MASK_PLAYERSOLID, &filter, &tr);
251 // A start inside geometry means a wall/step there, not a ledge.
252 return tr.startsolid || tr.fraction < 1.0f;
253}
254
235// Vertical distance from the standing player hull's feet to the first 255// Vertical distance from the standing player hull's feet to the first
236// standable surface below. Matches CategorizePosition's 2-unit probe and its 256// standable surface below. Matches CategorizePosition's 2-unit probe and its
237// plane.normal.z >= 0.7 rule, but sweeps much farther so the caller can 257// plane.normal.z >= 0.7 rule, but sweeps much farther so the caller can