diff options
| author | salmonik <salmonik@tuta.io> | 2026-09-14 16:47:32 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-09-14 16:47:32 +0200 |
| commit | 8af245ae414cb548a2188030ed8a52b31986252f (patch) | |
| tree | 0c77362c60b3441ddbb9d4da80944e667f24a927 /src/hl2h.h | |
| parent | Remove Climb feature; keep bind system for aimbot prep (mouse buttons bindable) (diff) | |
| download | hl2h-8af245ae414cb548a2188030ed8a52b31986252f.tar.gz hl2h-8af245ae414cb548a2188030ed8a52b31986252f.zip | |
Default map d1_town_01 (intro-less, enemies spawned)
Diffstat (limited to 'src/hl2h.h')
| -rw-r--r-- | src/hl2h.h | 25 |
1 files changed, 19 insertions, 6 deletions
| @@ -59,12 +59,20 @@ template <typename Fn> inline Fn vfunc(void *obj, size_t idx) { | |||
| 59 | // --------------------------------------------------------------------------- | 59 | // --------------------------------------------------------------------------- |
| 60 | // netvars | 60 | // netvars |
| 61 | // --------------------------------------------------------------------------- | 61 | // --------------------------------------------------------------------------- |
| 62 | |||
| 63 | struct NetVars { | 62 | struct NetVars { |
| 64 | int flags = -1; | 63 | int flags = -1; |
| 65 | int velocity = -1; | 64 | int velocity = -1; |
| 66 | int movetype = -1; | 65 | int movetype = -1; |
| 66 | int health = -1; | ||
| 67 | int maxhealth = -1; | ||
| 68 | int teamnum = -1; | ||
| 69 | int origin = -1; | ||
| 70 | int viewoffset = -1; | ||
| 71 | int mins = -1; | ||
| 72 | int maxs = -1; | ||
| 73 | // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72 | ||
| 67 | bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } | 74 | bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } |
| 75 | bool esp_ok() const { return ok() && health >= 0 && maxhealth >= 0 && teamnum >= 0 && origin >= 0 && viewoffset >= 0; } | ||
| 68 | }; | 76 | }; |
| 69 | extern NetVars g_net; | 77 | extern NetVars g_net; |
| 70 | 78 | ||
| @@ -116,16 +124,15 @@ enum { MOVETYPE_NOCLIP = 8, MOVETYPE_LADDER = 9 }; | |||
| 116 | 124 | ||
| 117 | struct Vector { float x, y, z; }; | 125 | struct Vector { float x, y, z; }; |
| 118 | struct QAngle { float x, y, z; }; | 126 | struct QAngle { float x, y, z; }; |
| 127 | // camera state captured each CreateMove (used by ESP / future aimbot) | ||
| 128 | extern Vector g_cam_eye; | ||
| 129 | extern Vector g_cam_view; | ||
| 119 | QAngle vector_angles(const Vector &forward); | 130 | QAngle vector_angles(const Vector &forward); |
| 120 | Vector angle_forward_vector(const QAngle &angles); | 131 | enum FeatureId { FEAT_BHOP = 0, FEAT_ABH = 1, FEAT_ESP = 2 }; |
| 121 | float getfov(const QAngle &my_view, const QAngle &aim_ang); | ||
| 122 | 132 | ||
| 123 | // --------------------------------------------------------------------------- | 133 | // --------------------------------------------------------------------------- |
| 124 | // cross-file declarations | 134 | // cross-file declarations |
| 125 | // --------------------------------------------------------------------------- | 135 | // --------------------------------------------------------------------------- |
| 126 | |||
| 127 | // feature ids shared by menu (feature_active) and hl2h.cpp (do_move) | ||
| 128 | enum FeatureId { FEAT_BHOP = 0, FEAT_ABH = 1 }; | ||
| 129 | void note_modified(const CUserCmd *cmd, int flags, const float *vel); | 136 | void note_modified(const CUserCmd *cmd, int flags, const float *vel); |
| 130 | CUserCmd *get_usercmd(int seq); | 137 | CUserCmd *get_usercmd(int seq); |
| 131 | void fix_verified_crc(int seq, uint32_t crc); | 138 | void fix_verified_crc(int seq, uint32_t crc); |
| @@ -135,6 +142,12 @@ void resolve_netvars(); | |||
| 135 | void find_modules(); | 142 | void find_modules(); |
| 136 | void init_conmsg(); | 143 | void init_conmsg(); |
| 137 | bool feature_active(int feature); | 144 | bool feature_active(int feature); |
| 145 | void *entitylist_get(int idx); | ||
| 146 | int engine_get_local_player(); | ||
| 147 | void draw_text_col(int x, int y, const char *s, int r, int g, int b); | ||
| 148 | void esp_draw(); | ||
| 149 | bool world_to_screen(const Vector &w, float &sx, float &sy); | ||
| 150 | |||
| 138 | void outer_draw(); | 151 | void outer_draw(); |
| 139 | // raw ISurface slot calls used by the PaintTraverseEx hook (hl2h.cpp) | 152 | // raw ISurface slot calls used by the PaintTraverseEx hook (hl2h.cpp) |
| 140 | using SurfFn = void (*)(void *, ...); | 153 | using SurfFn = void (*)(void *, ...); |
