From a07b1081c21813b87cd6a7872a962fff4e95b731 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Sat, 11 Apr 2026 20:32:33 +0200 Subject: [PATCH] Preserve previous jump speed in player locomotion --- src/runtime-three/player-locomotion.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/runtime-three/player-locomotion.ts b/src/runtime-three/player-locomotion.ts index 038615e3..34799a99 100644 --- a/src/runtime-three/player-locomotion.ts +++ b/src/runtime-three/player-locomotion.ts @@ -365,11 +365,13 @@ export function stepPlayerLocomotion( activeShape.mode !== "none"; const bufferedJumpTriggered = jumpTriggered && !jumpJustPressed && jumpBufferRemainingMs > 0; + const preservePreviousJumpSpeed = + !currentlyGrounded || bufferedJumpTriggered; const jumpRequestedPlanarSpeedBase = clampPlanarSpeed( Math.max( options.movement.moveSpeed, groundedRequestedPlanarSpeed, - previousRequestedPlanarSpeed + preservePreviousJumpSpeed ? previousRequestedPlanarSpeed : 0 ), options.movement.maxSpeed );