fix(input): Phase K live-test fixes — default-run, Q-autorun toggle, free cursor, no Holtburg flash

Four issues from K.3 live verification (2026-04-26 user report):

1. Default movement speed should be RUN, not walk.
   PlayerMovementController.MovementInput.Run was sourced from
   IsActionHeld(MovementRunLock) (Q held). Inverted to
   !IsActionHeld(MovementWalkMode) (Shift held = walk; default = run).

   Also fixed RetailDefaults() — MovementWalkMode was bound to
   (ShiftLeft, ModifierMask.None), but when LShift IS the primary
   key the OS keyboard reports CurrentModifiers=Shift and the
   chord lookup mismatches. Bind both LShift+Shift and RShift+Shift
   to match (the same fix AcdreamCurrentDefaults already had).

2. Q is autorun TOGGLE, not hold-to-run. Added _autoRunActive
   field; OnInputAction toggles it on MovementRunLock Press;
   MovementInput.Forward now ORs in _autoRunActive so autorun
   stays latched until canceled. Pressing Backup / Stop /
   StrafeLeft / StrafeRight clears the latch (deliberate movement
   wins, retail-faithful). Pressing Forward AGAIN does NOT cancel —
   matches retail's stack semantics.

3. Mouse cursor visible by default in chase mode + no Y-axis
   steering without an explicit hold input. OnCameraModeChanged
   now uses CursorMode.Normal for chase (was Raw — invisible
   pointer). MouseMove handler's "neither RMB nor MMB held"
   branch dropped its AdjustPitch call — pitch is gated to
   deliberate hold inputs only. Fly mode keeps Raw (continuous
   look-and-fly affordance).

   Restored AcdreamRmbOrbitHold binding in RetailDefaults() —
   K.1c silently dropped it when SelectRight took the RMB Press
   slot; the Hold-type binding coexists with Press so RMB orbit
   still works in addition to (future) SelectRight click.

4. Holtburg flashes briefly at live login. Added
   IsLiveModeWaitingForLogin gate (true iff ACDREAM_LIVE=1 AND
   chase camera has not yet been entered) that:
     * suppresses StreamingController.Tick in OnUpdate so no
       landblocks load around the hardcoded startup center
       0xA9B4 (Holtburg);
     * skips terrain + entity rendering in OnRender via a
       SkipWorldGeometry label after the sky pass.
   Sky still draws so the user sees a live, time-of-day-correct
   sky during the connection / character-list / EnterWorld
   handshake. Latches off once chase mode has been entered, so
   later fly-mode toggles render the world normally.

Tests still 1220 green.

Also commits .gitignore tmp/ rule (left over from K.3
session) — gitignored per-session scratch (commit message
drafts, ad-hoc temp files).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-04-26 10:11:01 +02:00
parent f42c164b90
commit bc9ee9fdfa
3 changed files with 141 additions and 16 deletions

View file

@ -152,8 +152,14 @@ public sealed class KeyBindings
b.Add(new(new KeyChord(Key.D, ModifierMask.Alt), InputAction.MovementStrafeRight));
b.Add(new(new KeyChord(Key.Right, ModifierMask.Alt), InputAction.MovementStrafeRight));
// Walk-mode modifier — Hold so a subscriber can latch state on
// press and unlatch on release.
b.Add(new(new KeyChord(Key.ShiftLeft, ModifierMask.None), InputAction.MovementWalkMode, ActivationType.Hold));
// press and unlatch on release. K-fix1 (2026-04-26): the chord
// modifier MUST be Shift, not None — when LShift/RShift is the
// primary key the OS keyboard reports CurrentModifiers=Shift
// alongside the key-down. Bind both left + right shift to match.
// This is the same pattern AcdreamCurrentDefaults uses for its
// Shift→RunLock binding (see lines 98-99 above).
b.Add(new(new KeyChord(Key.ShiftLeft, ModifierMask.Shift), InputAction.MovementWalkMode, ActivationType.Hold));
b.Add(new(new KeyChord(Key.ShiftRight, ModifierMask.Shift), InputAction.MovementWalkMode, ActivationType.Hold));
b.Add(new(new KeyChord(Key.Q, ModifierMask.None), InputAction.MovementRunLock));
b.Add(new(new KeyChord(Key.S, ModifierMask.None), InputAction.MovementStop));
b.Add(new(new KeyChord(Key.Y, ModifierMask.None), InputAction.Ready));
@ -333,6 +339,17 @@ public sealed class KeyBindings
b.Add(new(new KeyChord(Key.F9, ModifierMask.Ctrl), InputAction.AcdreamSensitivityUp));
b.Add(new(new KeyChord(Key.F10, ModifierMask.Ctrl), InputAction.AcdreamCycleWeather));
// K-fix1 (2026-04-26): RMB-hold camera orbit. Coexists with the
// SelectRight Press binding above — Press fires on click,
// AcdreamRmbOrbitHold fires on hold/release transitions so the
// chase camera can free-orbit while the user drags the mouse.
// Without this, RMB-orbit silently broke when K.1c flipped the
// default keymap from AcdreamCurrentDefaults to RetailDefaults.
b.Add(new(
new KeyChord(InputDispatcher.MouseButtonToKey(MouseButton.Right), ModifierMask.None, Device: 1),
InputAction.AcdreamRmbOrbitHold,
ActivationType.Hold));
return b;
}