summaryrefslogtreecommitdiffstats
path: root/src/hl2h.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 13:48:27 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 13:48:27 +0100
commit471f022f449a18766fedb1ff0a4204a933b95b9c (patch)
tree499fcd29f1c9f7933aade3f8ffad88b3ef10f377 /src/hl2h.h
parentscript: change the map for tests (diff)
downloadhl2h-471f022f449a18766fedb1ff0a4204a933b95b9c.tar.gz
hl2h-471f022f449a18766fedb1ff0a4204a933b95b9c.zip
Jumpbug: optional velocity-timed assist
The unduck window is only 2 units, while a 625-ups fall moves ~9.3 units per 66.7 Hz movement command, so pure jumpbug is ~20% reliable at that speed. - Add Jumpbug -> Assist timing (default off). When the natural next command would skip [36,38], pin the post-command ducked distance to 37 by writing the vertical velocity for that command. Pure jumpbug remains available with the option off. - Resolve the client local m_vecAbsVelocity (0x11C) via the client datamap and the server m_vecAbsVelocity (0x228) via the server datamap. - Write both the authoritative server velocity (what SetupMove reads through GetAbsVelocity) and the local prediction fields, so the next CreateMove sees the assisted origin on both sides. - Do not write the server m_vecVelocity directly: the datamap scan finds two same-named entries (0x1C and 0x29C); SetAbsVelocity syncs it after movement.
Diffstat (limited to 'src/hl2h.h')
-rw-r--r--src/hl2h.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hl2h.h b/src/hl2h.h
index 92ae3f1..08eb2ef 100644
--- a/src/hl2h.h
+++ b/src/hl2h.h
@@ -81,6 +81,7 @@ struct NetVars {
81 int maxs = -1; 81 int maxs = -1;
82 int lifestate = -1; 82 int lifestate = -1;
83 int modelindex = -1; 83 int modelindex = -1;
84 int absvelocity = -1; // client C_BaseEntity::m_vecAbsVelocity (prediction)
84 // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72 85 // ponytail: mins/maxs may be absent from some HL2 netvar tables; esp.cpp falls back to h=72
85 bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; } 86 bool ok() const { return flags >= 0 && velocity >= 0 && movetype >= 0; }
86 // ponytail: m_iMaxHealth isn't a netvar in HL2 SP; esp.cpp falls back to 100. 87 // ponytail: m_iMaxHealth isn't a netvar in HL2 SP; esp.cpp falls back to 100.
@@ -177,6 +178,7 @@ bool find_input_global();
177void resolve_netvars(); 178void resolve_netvars();
178bool resolve_server_netvars(); 179bool resolve_server_netvars();
179int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); 180int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out);
181bool server_set_velocity_z(int idx, float vz);
180int server_model_index(void *base); 182int server_model_index(void *base);
181void find_modules(); 183void find_modules();
182void init_conmsg(); 184void init_conmsg();
@@ -185,6 +187,7 @@ bool feature_has_bind(int feature);
185bool feature_bind_held(int feature); 187bool feature_bind_held(int feature);
186bool esp_option(int opt); 188bool esp_option(int opt);
187bool bhop_autostrafe_enabled(); 189bool bhop_autostrafe_enabled();
190bool jumpbug_assist_enabled();
188unsigned aimbot_bone_mask(); 191unsigned aimbot_bone_mask();
189int aimbot_smooth_step(); 192int aimbot_smooth_step();
190bool aimbot_vischeck_enabled(); 193bool aimbot_vischeck_enabled();