diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 13:48:27 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 13:48:27 +0100 |
| commit | 471f022f449a18766fedb1ff0a4204a933b95b9c (patch) | |
| tree | 499fcd29f1c9f7933aade3f8ffad88b3ef10f377 /src/hl2h.h | |
| parent | script: change the map for tests (diff) | |
| download | hl2h-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 '')
| -rw-r--r-- | src/hl2h.h | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -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(); | |||
| 177 | void resolve_netvars(); | 178 | void resolve_netvars(); |
| 178 | bool resolve_server_netvars(); | 179 | bool resolve_server_netvars(); |
| 179 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); | 180 | int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); |
| 181 | bool server_set_velocity_z(int idx, float vz); | ||
| 180 | int server_model_index(void *base); | 182 | int server_model_index(void *base); |
| 181 | void find_modules(); | 183 | void find_modules(); |
| 182 | void init_conmsg(); | 184 | void init_conmsg(); |
| @@ -185,6 +187,7 @@ bool feature_has_bind(int feature); | |||
| 185 | bool feature_bind_held(int feature); | 187 | bool feature_bind_held(int feature); |
| 186 | bool esp_option(int opt); | 188 | bool esp_option(int opt); |
| 187 | bool bhop_autostrafe_enabled(); | 189 | bool bhop_autostrafe_enabled(); |
| 190 | bool jumpbug_assist_enabled(); | ||
| 188 | unsigned aimbot_bone_mask(); | 191 | unsigned aimbot_bone_mask(); |
| 189 | int aimbot_smooth_step(); | 192 | int aimbot_smooth_step(); |
| 190 | bool aimbot_vischeck_enabled(); | 193 | bool aimbot_vischeck_enabled(); |
