[PR #6585] [MERGED] Take a seat instead of sweeping to it #6965

Closed
opened 2026-11-03 06:30:23 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/6585
Author: @MSedgeMC
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: fix/mount-seat-no-sweep


📝 Commits (2)

  • 0a0c2fd Take a seat instead of sweeping to it
  • 6d39171 Forget the seat when the rider gets up

📊 Changes

3 files changed (+26 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+10 -0)
📝 crates/horizon-client/src/game/mounts.rs (+7 -1)
📝 crates/horizon-client/src/game/remote_vehicles.rs (+9 -1)

📄 Description

When a player sits on a cushion (or mounts a boat, cart or animal), vanilla positions them
with Entity.moveTo(...), which sets the old position (xo/yo/zo) to the new one as
well as the position. The camera reads the pair, so the view cuts to the seat.

Horizon positions the rider every ridden tick with

self.previous_position = p.position;   // the seat from the last tick
p.position = seat;

which is right for the ticks that follow - the vehicle moves and the camera should follow it
smoothly - but on the tick the seat is first taken it leaves the previous position at the
place the player was standing, so that tick renders the camera travelling from there to the
cushion: the report's "small animation where I fly to it".

Both placing paths now remember which mount was placed last (posed_rider) and, on the tick
a new seat is taken, set the previous position to the seat itself, as moveTo does. The
ticks after it keep interpolating: nothing changes while riding a moving boat or animal.

Proven: cargo check -q -p horizon-client --lib clean, cargo test -q -p horizon-client --lib mount → 11 passed (0 failed) on the build VM, rustfmt --edition 2024 --check clean on
the three files.

Not proven: the visual result - this is a camera-position change and there is no test for
it. The in-game check is the report's own: sit on a cushion and the view should cut to it
instead of flying over, and then riding a moving boat or horse should still move smoothly.

Scope: this covers cushions, boats, carts and mob mounts, which are the two placing paths in
the client (remote_vehicles::tick_riding and mounts::position_rider). A rider restored
into a vehicle on join goes through the same first tick.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/6585 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/mount-seat-no-sweep` --- ### 📝 Commits (2) - [`0a0c2fd`](https://github.com/horizon-rust/horizon/commit/0a0c2fd5f104870b7f1780f156a1e563137d699f) Take a seat instead of sweeping to it - [`6d39171`](https://github.com/horizon-rust/horizon/commit/6d3917100d0870e29d1fd5a9e0f0a697acad1b8c) Forget the seat when the rider gets up ### 📊 Changes **3 files changed** (+26 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+10 -0) 📝 `crates/horizon-client/src/game/mounts.rs` (+7 -1) 📝 `crates/horizon-client/src/game/remote_vehicles.rs` (+9 -1) </details> ### 📄 Description When a player sits on a cushion (or mounts a boat, cart or animal), vanilla positions them with `Entity.moveTo(...)`, which sets the old position (`xo`/`yo`/`zo`) to the new one as well as the position. The camera reads the pair, so the view cuts to the seat. Horizon positions the rider every ridden tick with ```rust self.previous_position = p.position; // the seat from the last tick p.position = seat; ``` which is right for the ticks that follow - the vehicle moves and the camera should follow it smoothly - but on the tick the seat is first taken it leaves the previous position at the place the player was standing, so that tick renders the camera travelling from there to the cushion: the report's "small animation where I fly to it". Both placing paths now remember which mount was placed last (`posed_rider`) and, on the tick a new seat is taken, set the previous position to the seat itself, as `moveTo` does. The ticks after it keep interpolating: nothing changes while riding a moving boat or animal. **Proven:** `cargo check -q -p horizon-client --lib` clean, `cargo test -q -p horizon-client --lib mount` → 11 passed (0 failed) on the build VM, `rustfmt --edition 2024 --check` clean on the three files. **Not proven:** the visual result - this is a camera-position change and there is no test for it. The in-game check is the report's own: sit on a cushion and the view should cut to it instead of flying over, and then riding a moving boat or horse should still move smoothly. Scope: this covers cushions, boats, carts and mob mounts, which are the two placing paths in the client (`remote_vehicles::tick_riding` and `mounts::position_rider`). A rider restored into a vehicle on join goes through the same first tick. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:30:23 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#6965
No description provided.