Keyboard: weapon wheel, binoculars and camera work in scripted scenes #94

Manually merged
github merged 2 commits from github-bot/gh-94 into main 2026-12-01 20:58:45 +00:00 AGit
Owner

@⁠prinzjo on GitHub · 2026-12-01 18:41 UTC · original
prinzjo:fix/wheel-in-scripted-scenes → main · +124 −40 · 3 files · 2 commits · merged 2026-12-01 20:55 UTC

Scripted scenes switch walking off, which the input layer took for a menu, so the mouse stepped through menus instead of picking on the weapon wheel or moving the camera (first mission: wheel could not select the binoculars, mouse zoomed instead of looking around). A menu now needs one of its own actions active (frontend/game/map accept, cancel, up, down); a held wheel key is play. Unit tests for the rule are in keyboard_events::tests.

Generated with assistance of Claude Code (Opus 5.5 xhigh)

**@⁠prinzjo** on GitHub · 2026-12-01 18:41 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/94) `prinzjo:fix/wheel-in-scripted-scenes` → `main` · +124 −40 · 3 files · 2 commits · merged 2026-12-01 20:55 UTC Scripted scenes switch walking off, which the input layer took for a menu, so the mouse stepped through menus instead of picking on the weapon wheel or moving the camera (first mission: wheel could not select the binoculars, mouse zoomed instead of looking around). A menu now needs one of its own actions active (frontend/game/map accept, cancel, up, down); a held wheel key is play. Unit tests for the rule are in keyboard_events::tests. Generated with assistance of Claude Code (Opus 5.5 xhigh)
The input context said "menu" whenever INPUT_MOVE_UP_ONLY was inactive.
Scripted scenes take walking away too: in the first mission's boat the
world was drawn at 1,500-5,800 draws a frame for two minutes "in a menu"
(run play-1201-1830). Tab or mouse 4 still opened the weapon wheel there
(its action is active), but the wheel's hold was not noted in a menu, and
the mouse stepped as through a menu: nothing could be picked (the
binoculars the mission asks for).

Now the context comes from one function, keyboard_events::context: a held
wheel key means play and an open wheel, wherever walking is; a menu is
walking off with no wheel held. The hold is noted for a wheel-opening action
whatever the context, keys resolve as play while a wheel is open, and
leaving the "menu" for a wheel keeps the key that opened it down (releasing
it closed the wheel at once). The mouse looks at the wheel before the menu
(gameinput, mouse), so the 50 ms until the next look cannot step a menu.

keyboard_events::tests::a_wheel_held_open_is_play_even_without_walking.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The context still said "menu" wherever walking was off and no wheel was
held. Through the binoculars in the first mission's boat (run
play-1201-1845) the mouse then stepped as through a menu: its d-pad steps
zoomed, and the view did not move. The keys there found INPUT_AIM,
INPUT_SKIP_CUTSCENE and INPUT_SCRIPT_PAD_* active, and none of a menu's own
actions (accept, cancel, up, down of the frontend, game and map menus),
which every menu the title showed had (INPUT_FRONTEND_ACCEPT in every run).

A menu is now walking off with one of MENU_ACTIONS active: context()
takes it, the watch looks at them every 50 ms, and the keys' own look
(in_menu_now, one pass over the action table) does the same. Elsewhere it is
play: the mouse looks around, keys stand for play actions (W and S reach
INPUT_SCRIPT_PAD_* there, which zoom the binoculars).

keyboard_events::tests: a_menu_needs_its_own_actions_and_a_wheel_held_open_is_play,
menu_actions_hash_to_the_titles_ids.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-01 18:46:23 +00:00
github-bot referenced this pull request from a commit 2026-12-01 20:58:42 +00:00
github-bot referenced this pull request from a commit 2026-12-01 20:58:42 +00:00
github manually merged commit da99cded40 into main 2026-12-01 20:58:45 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.