summaryrefslogtreecommitdiffstats
path: root/src/hl2h.h
diff options
context:
space:
mode:
authorsalmonik <salmonik@tuta.io>2026-10-27 18:21:13 +0100
committersalmonik <salmonik@tuta.io>2026-10-27 18:21:13 +0100
commit304441c71997ee61e618146f4d4302c6d2b952ad (patch)
treee7a00d279b257f88e7a590da59023533cae6ae80 /src/hl2h.h
parentGUI: allow movement while open; freeze look and block bind capture (diff)
downloadhl2h-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.h')
-rw-r--r--src/hl2h.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hl2h.h b/src/hl2h.h
index 8a81439..d5a9dc3 100644
--- a/src/hl2h.h
+++ b/src/hl2h.h
@@ -129,7 +129,7 @@ struct CUserCmd {
129// engine constants 129// engine constants
130// --------------------------------------------------------------------------- 130// ---------------------------------------------------------------------------
131 131
132enum { IN_ATTACK = 1 << 0, IN_JUMP = 1 << 1, IN_DUCK = 1 << 2, IN_USE = 1 << 5, IN_ATTACK2 = 1 << 11 }; 132enum { IN_ATTACK = 1 << 0, IN_JUMP = 1 << 1, IN_DUCK = 1 << 2, IN_USE = 1 << 5, IN_ATTACK2 = 1 << 11, IN_SPEED = 1 << 17 };
133enum { FL_ONGROUND = 1 << 0, FL_DUCKING = 1 << 1, FL_INWATER = 1 << 9 }; 133enum { FL_ONGROUND = 1 << 0, FL_DUCKING = 1 << 1, FL_INWATER = 1 << 9 };
134enum { MOVETYPE_WALK = 2, MOVETYPE_NOCLIP = 8, MOVETYPE_LADDER = 9 }; 134enum { MOVETYPE_WALK = 2, MOVETYPE_NOCLIP = 8, MOVETYPE_LADDER = 9 };
135 135
@@ -180,6 +180,7 @@ enum EspOption {
180// --------------------------------------------------------------------------- 180// ---------------------------------------------------------------------------
181void note_modified(const CUserCmd *cmd, int flags, const float *vel); 181void note_modified(const CUserCmd *cmd, int flags, const float *vel);
182CUserCmd *get_usercmd(int seq); 182CUserCmd *get_usercmd(int seq);
183void input_clear_mouse_states();
183void fix_verified_crc(int seq, uint32_t crc); 184void fix_verified_crc(int seq, uint32_t crc);
184uint32_t usercmd_checksum(const CUserCmd *c); 185uint32_t usercmd_checksum(const CUserCmd *c);
185bool find_input_global(); 186bool find_input_global();