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. --- CONTEXT.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'CONTEXT.md') diff --git a/CONTEXT.md b/CONTEXT.md index b1ec4e7..38d9373 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -80,6 +80,7 @@ Relevant vtable slots (this build): | `m_vecMins` / `m_vecMaxs` | `0x1A8` / `0x1B4` | | `m_lifeState` | `0x7F` | | `m_nModelIndex` | `0x7C` | +| `m_vecAbsVelocity` (client local, not netvar) | `0x11C` | - Eye position = `m_vecOrigin + m_vecViewOffset` on **all three axes**. (The old code added the X component to Z, which left the eye ~64 units low.) @@ -106,6 +107,7 @@ HL2hake Active Jumpbug Active + Assist timing ESP Active Show neutral / healthbar / healthnum / name / skeleton / box / speed graph @@ -181,6 +183,21 @@ Binds use SDL scancodes; mouse buttons are pseudo-scancodes 600..604. - `drop` is measured from consecutive predicted origins (not a hard-coded tick interval). At high fall speeds the 2-unit band can be skipped between commands; a higher frame rate improves reliability. Best-effort by design. +- **Assist timing** (off by default): when the natural next command would jump + over the 2-unit window, force the post-command distance to 37 by writing the + vertical velocity. It needs both the authoritative server velocity and the + client prediction velocity: + - server `CBaseEntity::m_vecAbsVelocity` (datamap offset 0x228), read by + `SetupMove` via `GetAbsVelocity`; + - client `C_BaseEntity::m_vecAbsVelocity` (datamap offset 0x11C) and the + networked `m_vecVelocity` (0xE0 + 8). + The velocity is `dz / 0.015 + 0.5 * 600 * 0.015` where `dz` is the required + displacement for this command. This turns the ~20% timing success at 625 ups + into a repeatable setup, at the cost of one command with a nudged vertical + speed. Pure jumpbug remains available with Assist off. +- The server datamap has two `m_vecVelocity` entries (0x1C and 0x29C), so the + assist deliberately writes only `m_vecAbsVelocity`; `SetAbsVelocity` syncs + `m_vecVelocity` after the command. ## Gotchas / lessons -- cgit v1.2.3