summaryrefslogtreecommitdiffstats
path: root/src/hl2h.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/hl2h.h')
-rw-r--r--src/hl2h.h25
1 files changed, 19 insertions, 6 deletions
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 <typename Fn> inline Fn vfunc(void *obj, size_t idx) {
59// --------------------------------------------------------------------------- 59// ---------------------------------------------------------------------------
60// netvars 60// netvars
61// --------------------------------------------------------------------------- 61// ---------------------------------------------------------------------------
62
63struct NetVars { 62struct 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};
69extern NetVars g_net; 77extern NetVars g_net;
70 78
@@ -116,16 +124,15 @@ enum { MOVETYPE_NOCLIP = 8, MOVETYPE_LADDER = 9 };
116 124
117struct Vector { float x, y, z; }; 125struct Vector { float x, y, z; };
118struct QAngle { float x, y, z; }; 126struct QAngle { float x, y, z; };
127// camera state captured each CreateMove (used by ESP / future aimbot)
128extern Vector g_cam_eye;
129extern Vector g_cam_view;
119QAngle vector_angles(const Vector &forward); 130QAngle vector_angles(const Vector &forward);
120Vector angle_forward_vector(const QAngle &angles); 131enum FeatureId { FEAT_BHOP = 0, FEAT_ABH = 1, FEAT_ESP = 2 };
121float 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)
128enum FeatureId { FEAT_BHOP = 0, FEAT_ABH = 1 };
129void note_modified(const CUserCmd *cmd, int flags, const float *vel); 136void note_modified(const CUserCmd *cmd, int flags, const float *vel);
130CUserCmd *get_usercmd(int seq); 137CUserCmd *get_usercmd(int seq);
131void fix_verified_crc(int seq, uint32_t crc); 138void fix_verified_crc(int seq, uint32_t crc);
@@ -135,6 +142,12 @@ void resolve_netvars();
135void find_modules(); 142void find_modules();
136void init_conmsg(); 143void init_conmsg();
137bool feature_active(int feature); 144bool feature_active(int feature);
145void *entitylist_get(int idx);
146int engine_get_local_player();
147void draw_text_col(int x, int y, const char *s, int r, int g, int b);
148void esp_draw();
149bool world_to_screen(const Vector &w, float &sx, float &sy);
150
138void outer_draw(); 151void 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)
140using SurfFn = void (*)(void *, ...); 153using SurfFn = void (*)(void *, ...);