summaryrefslogtreecommitdiffstats
path: root/CONTEXT.md
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 13:19:00 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 13:22:27 +0100
commitbb99c978c5f982e80a3007101fd61fe23635e242 (patch)
tree749acafe3d2c4fcffeb2060c7a4a92c49aa69407 /CONTEXT.md
parentSpeed graph: show current speed at the top-right (diff)
downloadhl2h-bb99c978c5f982e80a3007101fd61fe23635e242.tar.gz
hl2h-bb99c978c5f982e80a3007101fd61fe23635e242.zip
Jumpbug: automatic duck+jump on damaging falls
- Predict the landing speed from the current vertical velocity and a swept standing-hull ground trace; engage only when it exceeds PLAYER_MAX_SAFE_FALL_SPEED. - Press duck one command before the unduck window so FinishDuck's 36-unit origin raise places the feet ~37 units above the floor. - On the next command release duck and press jump: PlayerMove runs Duck() before CheckJumpButton, so FinishUnDuck sets ground, the jump executes, and CheckFalling never sees ground for the fall-damage check. - Measure the per-command fall from consecutive airborne origins instead of a fixed tick interval; clear IN_JUMP while waiting so the pogo latch is clear. - New Movement -> Jumpbug -> Active toggle (default on), config [jumpbug].
Diffstat (limited to 'CONTEXT.md')
-rw-r--r--CONTEXT.md30
1 files changed, 27 insertions, 3 deletions
diff --git a/CONTEXT.md b/CONTEXT.md
index cd3811d..b1ec4e7 100644
--- a/CONTEXT.md
+++ b/CONTEXT.md
@@ -104,21 +104,26 @@ HL2hake
104 Uni-directional auto-strafe 104 Uni-directional auto-strafe
105 ABH 105 ABH
106 Active 106 Active
107 Jumpbug
108 Active
107 ESP 109 ESP
108 Active 110 Active
109 Show neutral / healthbar / healthnum / name / skeleton / box 111 Show neutral / healthbar / healthnum / name / skeleton / box / speed graph
110 Aimbot 112 Aimbot
111 Active 113 Active
112 Bind 114 Bind
113 Vischeck 115 Vischeck
114 Bones -> Head / Torso / Left arm / Right arm / Left leg / Right leg 116 Bones -> Head / Torso / Left arm / Right arm / Left leg / Right leg
115 Smoothness (1..45 deg/tick, Left/Right) 117 Smoothness (1..45 deg/tick, Left/Right)
118 FOV (1..180 deg, Left/Right)
119 Show FOV circle
116 Triggerbot 120 Triggerbot
117 Active 121 Active
118 Bind 122 Bind
119 Silent aim 123 Silent aim
120 Active 124 Active
121 Bind 125 Bind
126 FOV (1..180 deg, Left/Right)
122``` 127```
123 128
124Binds use SDL scancodes; mouse buttons are pseudo-scancodes 600..604. 129Binds use SDL scancodes; mouse buttons are pseudo-scancodes 600..604.
@@ -156,6 +161,27 @@ Binds use SDL scancodes; mouse buttons are pseudo-scancodes 600..604.
156 zero forward/side movement; HL2's jump speed-bound subtraction then 161 zero forward/side movement; HL2's jump speed-bound subtraction then
157 accelerates along the velocity. Camera restored at `FRAME_RENDER_START`. 162 accelerates along the velocity. Camera restored at `FRAME_RENDER_START`.
158 163
164## Jumpbug
165
166- Automatic while falling when the predicted landing speed
167 `sqrt(vz^2 + 2*600*x)` exceeds `PLAYER_MAX_SAFE_FALL_SPEED` (526.5).
168- The engine only applies fall damage when `CheckFalling` sees a ground entity
169 at the end of the frame. `PlayerMove` runs `Duck()` **before**
170 `FullWalkMove`'s `CheckJumpButton`, so a same-frame `FinishUnDuck` sets ground
171 via `CategorizePosition`, the jump executes, and the fall-damage test is
172 skipped.
173- In air, `FinishDuck` raises the origin by 36 (standing hull 72, duck hull 36)
174 and `CanUnduck` only succeeds when the floor is at least 36 below; after
175 unducking, `CategorizePosition` needs it within 2 more units. The unduck
176 window is therefore a 2-unit band `[36,38]` above the floor.
177- The feature presses duck when the standing distance `x` is within
178 `drop + [0,2]` (where `drop` is the previous command's measured fall), then
179 releases duck + `IN_JUMP` on the next command when `x` is in `[36,38]`.
180 It also clears `IN_JUMP` while waiting so the pogo latch is clear.
181- `drop` is measured from consecutive predicted origins (not a hard-coded tick
182 interval). At high fall speeds the 2-unit band can be skipped between
183 commands; a higher frame rate improves reliability. Best-effort by design.
184
159## Gotchas / lessons 185## Gotchas / lessons
160 186
161- Never pipe-mask build failures: 187- Never pipe-mask build failures:
@@ -171,8 +197,6 @@ Binds use SDL scancodes; mouse buttons are pseudo-scancodes 600..604.
171 197
172- **Melee killbot**: 360° silent aim for hostile NPCs inside crowbar/melee 198- **Melee killbot**: 360° silent aim for hostile NPCs inside crowbar/melee
173 range, sorted by distance, only while the crowbar is held. 199 range, sorted by distance, only while the crowbar is held.
174- **Jumpbug**: automate the HL2 jumpbug movement glitch (trigger conditions
175 to be defined/tested).
176- **GUI**: replace/augment the VGUI ISurface menu with an immediate-mode GUI 200- **GUI**: replace/augment the VGUI ISurface menu with an immediate-mode GUI
177 (Dear ImGui or a custom implementation); needs a design grill first. 201 (Dear ImGui or a custom implementation); needs a design grill first.
178- **Distance weapon spread thesis**: TBD — user will explain. Likely models 202- **Distance weapon spread thesis**: TBD — user will explain. Likely models