diff options
| author | salmonik <salmonik@tuta.io> | 2026-10-27 18:21:13 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-10-27 18:21:13 +0100 |
| commit | 304441c71997ee61e618146f4d4302c6d2b952ad (patch) | |
| tree | e7a00d279b257f88e7a590da59023533cae6ae80 /src/hl2h.h | |
| parent | GUI: allow movement while open; freeze look and block bind capture (diff) | |
| download | hl2h-304441c71997ee61e618146f4d4302c6d2b952ad.tar.gz hl2h-304441c71997ee61e618146f4d4302c6d2b952ad.zip | |
GUI: Insert-only close, freeze mouse look at the source
Feedback pass:
- Insert now toggles the GUI; the old text tree moved to F1.
- Remove the title-bar X. Insert is the only close path; Esc only cancels
bind capture.
- Discard accumulated mouse deltas in CInput::CreateMove before the game can
apply them (CInput::ClearStates), so the camera no longer moves for a frame
and snaps back. Also skip ExtraMouseSample and zero relative mouse state
while the GUI is open.
- Strip attack/use/impulse/weapon selection from the command while open;
keep jump, duck and walk. Skip combat command edits (spread seed) too.
- Widen System page buttons so "Reload config" and "Reset defaults" fit.
- Update CONTEXT/ADR for the Insert-only close behavior.
Diffstat (limited to '')
| -rw-r--r-- | src/hl2h.h | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -129,7 +129,7 @@ struct CUserCmd { | |||
| 129 | // engine constants | 129 | // engine constants |
| 130 | // --------------------------------------------------------------------------- | 130 | // --------------------------------------------------------------------------- |
| 131 | 131 | ||
| 132 | enum { IN_ATTACK = 1 << 0, IN_JUMP = 1 << 1, IN_DUCK = 1 << 2, IN_USE = 1 << 5, IN_ATTACK2 = 1 << 11 }; | 132 | enum { IN_ATTACK = 1 << 0, IN_JUMP = 1 << 1, IN_DUCK = 1 << 2, IN_USE = 1 << 5, IN_ATTACK2 = 1 << 11, IN_SPEED = 1 << 17 }; |
| 133 | enum { FL_ONGROUND = 1 << 0, FL_DUCKING = 1 << 1, FL_INWATER = 1 << 9 }; | 133 | enum { FL_ONGROUND = 1 << 0, FL_DUCKING = 1 << 1, FL_INWATER = 1 << 9 }; |
| 134 | enum { MOVETYPE_WALK = 2, MOVETYPE_NOCLIP = 8, MOVETYPE_LADDER = 9 }; | 134 | enum { MOVETYPE_WALK = 2, MOVETYPE_NOCLIP = 8, MOVETYPE_LADDER = 9 }; |
| 135 | 135 | ||
| @@ -180,6 +180,7 @@ enum EspOption { | |||
| 180 | // --------------------------------------------------------------------------- | 180 | // --------------------------------------------------------------------------- |
| 181 | void note_modified(const CUserCmd *cmd, int flags, const float *vel); | 181 | void note_modified(const CUserCmd *cmd, int flags, const float *vel); |
| 182 | CUserCmd *get_usercmd(int seq); | 182 | CUserCmd *get_usercmd(int seq); |
| 183 | void input_clear_mouse_states(); | ||
| 183 | void fix_verified_crc(int seq, uint32_t crc); | 184 | void fix_verified_crc(int seq, uint32_t crc); |
| 184 | uint32_t usercmd_checksum(const CUserCmd *c); | 185 | uint32_t usercmd_checksum(const CUserCmd *c); |
| 185 | bool find_input_global(); | 186 | bool find_input_global(); |
