[PR #4650] [MERGED] Server: reset a ridden vehicle's last good position every tick (moved wrongly loop) #5755

Closed
opened 2026-11-03 05:14:47 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4650
Author: @ludovic111
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @ludovic111

Base: main ← Head: fix/vehicle-moved-wrongly


📝 Commits (1)

  • fde63c0 Server: reset a ridden vehicle's last good position every tick

📊 Changes

2 files changed (+85 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/lan_vehicles.rs (+13 -0)
📝 tools/lan_e2e.py (+72 -2)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

What

The server now resets a ridden vehicle's last good position to where the vehicle is at every tick, as vanilla's ServerGamePacketListenerImpl.tick does (vehicleFirstGood* / vehicleLastGood*).

Why

Horizon set that position only on boarding and after an accepted move. Once the server moved the vehicle itself (/tp, a piston, a push, a long move refused as "moved too quickly"), it checked the rider's next moves against the old position:

  • every move failed and was sent back;
  • the client's answer to that resync failed too;
  • the boat stayed stuck where the server had put it.

On the official server tonight, three boats did this for 1 to 5 minutes each: 250,000 vehicle N moved wrongly lines (16 MB) in 30 minutes, up to 6,700 a second. One of them started right after moved too quickly! 901.

Proof

New lan_e2e check boat_shoved: the host and the guest each ride a boat; a piston shoves it, /tp moves it, and they paddle on.

main this PR
host stuck (paddled 0.0 blocks), 70 "moved wrongly" lines paddled 3.0, 1 line
guest (not reached) paddled 3.0, 1 line

python3 tools/lan_e2e.py --check boats --check mounts --check riding --check boat_shoved with this PR: mounts, riding and boat_shoved pass. boats fails at "ten hits left the boat in place", the same on main without this change (breaking the boat with fists), so it is unrelated.

The flood of repeated warnings gets its own limit in a separate PR.

pr_ready (tools/pr_ready.py --quick on ludovics-mac-mini, against origin/main at 34118b285, 8 min 20 s)

Check Result
Scope ✅ 2 files, +85 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (1 min 2 s)
rustfmt ✅ (6 s)
clippy ✅ (2 min 19 s)
tests: horizon-client ✅ 1096 passed (4 min 33 s)
doc tests ✅ 0 passed (1 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ 33 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 21 more
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 Generated with Claude Code


🔄 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/4650 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/vehicle-moved-wrongly` --- ### 📝 Commits (1) - [`fde63c0`](https://github.com/horizon-rust/horizon/commit/fde63c0597908e2c8a997b847e3d4a557ea140fa) Server: reset a ridden vehicle's last good position every tick ### 📊 Changes **2 files changed** (+85 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/lan_vehicles.rs` (+13 -0) 📝 `tools/lan_e2e.py` (+72 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What The server now resets a ridden vehicle's last good position to where the vehicle is at every tick, as vanilla's `ServerGamePacketListenerImpl.tick` does (`vehicleFirstGood*` / `vehicleLastGood*`). ## Why Horizon set that position only on boarding and after an accepted move. Once the server moved the vehicle itself (`/tp`, a piston, a push, a long move refused as "moved too quickly"), it checked the rider's next moves against the old position: - every move failed and was sent back; - the client's answer to that resync failed too; - the boat stayed stuck where the server had put it. On the official server tonight, three boats did this for 1 to 5 minutes each: **250,000 `vehicle N moved wrongly` lines (16 MB) in 30 minutes, up to 6,700 a second**. One of them started right after `moved too quickly! 901`. ## Proof New `lan_e2e` check `boat_shoved`: the host and the guest each ride a boat; a piston shoves it, `/tp` moves it, and they paddle on. | | main | this PR | |---|---|---| | host | **stuck** (paddled 0.0 blocks), 70 "moved wrongly" lines | paddled 3.0, 1 line | | guest | (not reached) | paddled 3.0, 1 line | `python3 tools/lan_e2e.py --check boats --check mounts --check riding --check boat_shoved` with this PR: `mounts`, `riding` and `boat_shoved` pass. `boats` fails at "ten hits left the boat in place", the same on main without this change (breaking the boat with fists), so it is unrelated. The flood of repeated warnings gets its own limit in a separate PR. **pr_ready** (`tools/pr_ready.py --quick` on ludovics-mac-mini, against origin/main at 34118b285, 8 min 20 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +85 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (1 min 2 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (2 min 19 s) | | tests: horizon-client | ✅ 1096 passed (4 min 33 s) | | doc tests | ✅ 0 passed (1 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ 33 affected, to run in CI (--quick): block_removal, command_exec, composter, crafter, cursor_death, dedicated_server, dispenser, forced_end, friends_integration, hardcore_respawn, lan_integration, locator_bar and 21 more | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:47 +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#5755
No description provided.