diff --git a/src/AcDream.App/Input/PlayerMovementController.cs b/src/AcDream.App/Input/PlayerMovementController.cs index 03114d63..b6923fb9 100644 --- a/src/AcDream.App/Input/PlayerMovementController.cs +++ b/src/AcDream.App/Input/PlayerMovementController.cs @@ -816,6 +816,14 @@ public sealed class PlayerMovementController _body.TransientState = TransientStateFlags.Contact | TransientStateFlags.OnWalkable; _body.Velocity = Vector3.Zero; + // #145 Slice 7: idle the motion interpreter on a server snap / teleport arrival. + // SetPosition zeros the body velocity, but the motion interpreter still holds the + // PRE-teleport ForwardCommand (e.g. RunForward), so the next Update() would + // reconstruct that run vector via get_state_velocity and the player would sprint + // off in the old direction the instant input resumes. Resetting the forward + // command to Ready makes the player arrive at rest. + _motion.DoMotion(MotionCommand.Ready, 1.0f); + // Reset physics clock so any subsequent update_object calls start fresh. _body.LastUpdateTime = 0.0; _physicsAccum = 0f;