From 471f022f449a18766fedb1ff0a4204a933b95b9c Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 13:48:27 +0100 Subject: 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. --- src/hl2h.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/hl2h.h') 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 { int maxs = -1; int lifestate = -1; int modelindex = -1; + int absvelocity = -1; // client C_BaseEntity::m_vecAbsVelocity (prediction) // 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; } // ponytail: m_iMaxHealth isn't a netvar in HL2 SP; esp.cpp falls back to 100. @@ -177,6 +178,7 @@ bool find_input_global(); void resolve_netvars(); bool resolve_server_netvars(); int server_entity_health(int idx, int *maxhealth, int *lifestate, void **base_out); +bool server_set_velocity_z(int idx, float vz); int server_model_index(void *base); void find_modules(); void init_conmsg(); @@ -185,6 +187,7 @@ bool feature_has_bind(int feature); bool feature_bind_held(int feature); bool esp_option(int opt); bool bhop_autostrafe_enabled(); +bool jumpbug_assist_enabled(); unsigned aimbot_bone_mask(); int aimbot_smooth_step(); bool aimbot_vischeck_enabled(); -- cgit v1.2.3