fix(ebike): unlock walking during breakdown + hide interact prompt + 450m ride

Three fixes for the ebike-breakdown substep:

1. PlayerController: the previous `if (!isEbikeBreakdown)` guard
   zeroed _wishDir for everyone during breakdown, including the
   player after they had been auto-dismounted to walk mode. Narrow
   the guard to `isEbikeMounted && isEbikeBreakdown` so the bike
   stops accepting drive input but the player on foot can move.

2. Ebike: track `window.ebikeBreakdownActive` in component state
   and hide the InteractableObject (and therefore the interact
   prompt UI) while the breakdown sequence is active. The bike must
   read as inert and non-interactive while the panne dialogue plays
   and during the auto-dismount that follows.

3. ebikeConfig: bump EBIKE_INTRO_BREAKDOWN_DISTANCE from 15 m to
   450 m so the panne triggers after a real ride instead of a few
   meters from the parked spawn.
This commit is contained in:
Tom Boullay
2026-06-03 00:46:30 +02:00
parent 675a45f02b
commit 00b1ff9e93
3 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ export const EBIKE_WORLD_POSITION: Vector3Tuple = [68, 0.8, 65];
export const EBIKE_WORLD_ROTATION_Y = -2.5;
export const EBIKE_WORLD_SCALE = 0.35;
export const EBIKE_INTRO_BREAKDOWN_DISTANCE = 15;
export const EBIKE_INTRO_BREAKDOWN_DISTANCE = 450;
export const EBIKE_BREAKDOWN_DIALOGUE_DELAY_MS = 250;
export const EBIKE_ACCELERATION_DURATION_MS = 2000;