From 8af245ae414cb548a2188030ed8a52b31986252f Mon Sep 17 00:00:00 2001 From: salmonik Date: Mon, 14 Sep 2026 16:47:32 +0200 Subject: Default map d1_town_01 (intro-less, enemies spawned) --- src/hl2h.h | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'src/hl2h.h') diff --git a/src/hl2h.h b/src/hl2h.h index 88c6c0d..d6a005e 100644 --- a/src/hl2h.h +++ b/src/hl2h.h @@ -59,12 +59,20 @@ template inline Fn vfunc(void *obj, size_t idx) { // --------------------------------------------------------------------------- // netvars // --------------------------------------------------------------------------- - struct NetVars { int flags = -1; int velocity = -1; int movetype = -1; + int health = -1; + int maxhealth = -1; + int teamnum = -1; + int origin = -1; + int viewoffset = -1; + int mins = -1; + int maxs = -1; + // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72 bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } + bool esp_ok() const { return ok() && health >= 0 && maxhealth >= 0 && teamnum >= 0 && origin >= 0 && viewoffset >= 0; } }; extern NetVars g_net; @@ -116,16 +124,15 @@ enum { MOVETYPE_NOCLIP = 8, MOVETYPE_LADDER = 9 }; struct Vector { float x, y, z; }; struct QAngle { float x, y, z; }; +// camera state captured each CreateMove (used by ESP / future aimbot) +extern Vector g_cam_eye; +extern Vector g_cam_view; QAngle vector_angles(const Vector &forward); -Vector angle_forward_vector(const QAngle &angles); -float getfov(const QAngle &my_view, const QAngle &aim_ang); +enum FeatureId { FEAT_BHOP = 0, FEAT_ABH = 1, FEAT_ESP = 2 }; // --------------------------------------------------------------------------- // cross-file declarations // --------------------------------------------------------------------------- - -// feature ids shared by menu (feature_active) and hl2h.cpp (do_move) -enum FeatureId { FEAT_BHOP = 0, FEAT_ABH = 1 }; void note_modified(const CUserCmd *cmd, int flags, const float *vel); CUserCmd *get_usercmd(int seq); void fix_verified_crc(int seq, uint32_t crc); @@ -135,6 +142,12 @@ void resolve_netvars(); void find_modules(); void init_conmsg(); bool feature_active(int feature); +void *entitylist_get(int idx); +int engine_get_local_player(); +void draw_text_col(int x, int y, const char *s, int r, int g, int b); +void esp_draw(); +bool world_to_screen(const Vector &w, float &sx, float &sy); + void outer_draw(); // raw ISurface slot calls used by the PaintTraverseEx hook (hl2h.cpp) using SurfFn = void (*)(void *, ...); -- cgit v1.2.3