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.cpp | |
| 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 'src/hl2h.cpp')
| -rw-r--r-- | src/hl2h.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hl2h.cpp b/src/hl2h.cpp index a0e6b53..1460577 100644 --- a/src/hl2h.cpp +++ b/src/hl2h.cpp | |||
| @@ -561,7 +561,8 @@ static void do_move(int seq, float frametime) { | |||
| 561 | cmd->buttons = 0; | 561 | cmd->buttons = 0; |
| 562 | } else { | 562 | } else { |
| 563 | // Movement is allowed while the GUI is open, but not look/attack/use. | 563 | // Movement is allowed while the GUI is open, but not look/attack/use. |
| 564 | cmd->buttons &= (IN_JUMP | IN_DUCK); | 564 | // Keep locomotion buttons (jump, duck, walk) only. |
| 565 | cmd->buttons &= (IN_JUMP | IN_DUCK | IN_SPEED); | ||
| 565 | } | 566 | } |
| 566 | cmd->impulse = 0; | 567 | cmd->impulse = 0; |
| 567 | cmd->weaponselect = 0; | 568 | cmd->weaponselect = 0; |
