From 304441c71997ee61e618146f4d4302c6d2b952ad Mon Sep 17 00:00:00 2001 From: salmonik Date: Tue, 27 Oct 2026 18:21:13 +0100 Subject: 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. --- src/hl2h.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/hl2h.cpp') 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) { cmd->buttons = 0; } else { // Movement is allowed while the GUI is open, but not look/attack/use. - cmd->buttons &= (IN_JUMP | IN_DUCK); + // Keep locomotion buttons (jump, duck, walk) only. + cmd->buttons &= (IN_JUMP | IN_DUCK | IN_SPEED); } cmd->impulse = 0; cmd->weaponselect = 0; -- cgit v1.2.3