diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 13:19:00 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 13:22:27 +0100 |
| commit | bb99c978c5f982e80a3007101fd61fe23635e242 (patch) | |
| tree | 749acafe3d2c4fcffeb2060c7a4a92c49aa69407 /src/hl2h.h | |
| parent | Speed graph: show current speed at the top-right (diff) | |
| download | hl2h-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 'src/hl2h.h')
| -rw-r--r-- | src/hl2h.h | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -128,8 +128,8 @@ struct CUserCmd { | |||
| 128 | // --------------------------------------------------------------------------- | 128 | // --------------------------------------------------------------------------- |
| 129 | 129 | ||
| 130 | enum { IN_ATTACK = 1 << 0, IN_JUMP = 1 << 1, IN_DUCK = 1 << 2, IN_USE = 1 << 5 }; | 130 | enum { IN_ATTACK = 1 << 0, IN_JUMP = 1 << 1, IN_DUCK = 1 << 2, IN_USE = 1 << 5 }; |
| 131 | enum { FL_ONGROUND = 1 << 0, FL_INWATER = 1 << 9 }; | 131 | enum { FL_ONGROUND = 1 << 0, FL_DUCKING = 1 << 1, FL_INWATER = 1 << 9 }; |
| 132 | enum { MOVETYPE_NOCLIP = 8, MOVETYPE_LADDER = 9 }; | 132 | enum { MOVETYPE_WALK = 2, MOVETYPE_NOCLIP = 8, MOVETYPE_LADDER = 9 }; |
| 133 | 133 | ||
| 134 | // --------------------------------------------------------------------------- | 134 | // --------------------------------------------------------------------------- |
| 135 | // vector math | 135 | // vector math |
| @@ -152,7 +152,8 @@ enum FeatureId { | |||
| 152 | FEAT_ESP = 2, | 152 | FEAT_ESP = 2, |
| 153 | FEAT_AIMBOT = 3, | 153 | FEAT_AIMBOT = 3, |
| 154 | FEAT_TRIGGERBOT = 4, | 154 | FEAT_TRIGGERBOT = 4, |
| 155 | FEAT_SILENTAIM = 5 | 155 | FEAT_SILENTAIM = 5, |
| 156 | FEAT_JUMPBUG = 6 | ||
| 156 | }; | 157 | }; |
| 157 | enum EspOption { | 158 | enum EspOption { |
| 158 | ESP_OPT_SHOW_NEUTRAL = 0, | 159 | ESP_OPT_SHOW_NEUTRAL = 0, |
| @@ -200,6 +201,7 @@ bool world_to_screen(const Vector &w, float &sx, float &sy); | |||
| 200 | void set_silent_restore(const QAngle &angles); | 201 | void set_silent_restore(const QAngle &angles); |
| 201 | bool is_visible(const Vector &eye, const Vector &point); | 202 | bool is_visible(const Vector &eye, const Vector &point); |
| 202 | void *trace_entity(const Vector &start, const Vector &end, void *ignore); | 203 | void *trace_entity(const Vector &start, const Vector &end, void *ignore); |
| 204 | float ground_distance(const Vector &origin, void *ignore, float max_dist); | ||
| 203 | 205 | ||
| 204 | // bones.cpp — client-side animated skeleton / hitbox access (see there) | 206 | // bones.cpp — client-side animated skeleton / hitbox access (see there) |
| 205 | bool bones_update(int idx, void *ent); | 207 | bool bones_update(int idx, void *ent); |
