[PR #3875] [MERGED] Boats: steer with the input latched on the previous tick #5267

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3875
Author: @xFedeT
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @levzzz5154

Base: main ← Head: fix/boat-paddle-input-latch


📝 Commits (6)

  • 0cfb040 Boats: steer with the input latched on the previous tick
  • d1129a9 Merge remote-tracking branch 'origin/main' into fix/boat-paddle-input-latch
  • 9ad9d08 Merge main into fix/boat-paddle-input-latch (resolve tools/lan_e2e.py)
  • 6db70a1 Merge main into fix/boat-paddle-input-latch (resolve tools/lan_e2e.py)
  • 6ca9531 Merge main into fix/boat-paddle-input-latch (resolve tools/lan_e2e.py)
  • f0ac52b Merge main into fix/boat-paddle-input-latch (resolve tools/lan_e2e.py)

📊 Changes

3 files changed (+62 additions, -4 deletions)

View changed files

📝 crates/horizon-client/src/game/boats.rs (+3 -2)
📝 crates/horizon-client/src/game/remote_vehicles.rs (+4 -2)
📝 tools/lan_e2e.py (+55 -0)

📄 Description

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

Fixes #3789. Checked: no open PR touches the boat input (gh pr list --search "boat paddle"). The issue is not claimed in Kira yet (the 8-claim cap); I left a comment on it and will claim it when a slot frees.

What and why

GrimAC flags Simulation when a boat on land starts being paddled: the 0.04 forward acceleration is applied one tick before the paddle packet that describes it. In vanilla LocalPlayer.rideTick calls AbstractBoat.setInput after the boat ticked (the vehicle ticks first, then its passenger), so AbstractBoat.tick runs controlBoat with the keys of the previous tick and sends the paddle that matches the motion it just made. Horizon set the keys right before tick_boat, a tick ahead.

Change

  • game/boats.rs tick_riding and game/remote_vehicles.rs remote_ride (the single player on its server thread, LAN guests and dedicated-server players use the second): tick the boat with the input already latched, then latch this tick's keys.

Vanilla reference

AbstractBoat.tick, AbstractBoat.controlBoat, AbstractBoat.setInput, LocalPlayer.rideTick.

Testing

  • New lan_e2e --check boat_input_latch (host and guest): a boat at rest on land is paddled with W held; with the ticks counted exactly in one ctl script, the distance travelled matches the latched sequence (0 in the tick W is read, then 0.04, 0.064, ... with land friction 0.6) for 6 trials each, with varied key timing. On main it fails (moved [0.0, 0.04, 0.104], want [0.0, 0.0, 0.04]: the boat moved in the tick W was read); with this change it passes.
  • lan_e2e --check boat-dismount-pose passes. --check boats fails with and without this change (ten hits left the boat in place, the break-by-fist step at the end, unrelated).
  • pr_ready --quick (Python 3.12): fmt, Python tests (423) and the horizon-client boat tests pass. Two failures are on main itself, not from this change, and each already has an open fix: clippy log_display unused on macOS (#3874) and entity_nbt::axolotl_nbt_tests::bucket_cooldown_and_brain_memories_survive_and_expired_cooldown_is_removed (#3851). They go away when those merge.

🤖 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/3875 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `fix/boat-paddle-input-latch` --- ### 📝 Commits (6) - [`0cfb040`](https://github.com/horizon-rust/horizon/commit/0cfb0400c8de96127ed937b268585ba33b1dafa4) Boats: steer with the input latched on the previous tick - [`d1129a9`](https://github.com/horizon-rust/horizon/commit/d1129a9fcef0935fef699982711997468e84d4c3) Merge remote-tracking branch 'origin/main' into fix/boat-paddle-input-latch - [`9ad9d08`](https://github.com/horizon-rust/horizon/commit/9ad9d087ef34b88aa9a7606a50176018496f2566) Merge main into fix/boat-paddle-input-latch (resolve tools/lan_e2e.py) - [`6db70a1`](https://github.com/horizon-rust/horizon/commit/6db70a1ae45e2d26434fe0de610386c06ce613bd) Merge main into fix/boat-paddle-input-latch (resolve tools/lan_e2e.py) - [`6ca9531`](https://github.com/horizon-rust/horizon/commit/6ca953146846182888d4e3a8d72edf7064f39a5c) Merge main into fix/boat-paddle-input-latch (resolve tools/lan_e2e.py) - [`f0ac52b`](https://github.com/horizon-rust/horizon/commit/f0ac52bf7fb46ba364645eac1a5e355a582cab11) Merge main into fix/boat-paddle-input-latch (resolve tools/lan_e2e.py) ### 📊 Changes **3 files changed** (+62 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/boats.rs` (+3 -2) 📝 `crates/horizon-client/src/game/remote_vehicles.rs` (+4 -2) 📝 `tools/lan_e2e.py` (+55 -0) </details> ### 📄 Description > 🤖 Opened by Federico's AI agent (Claude), not by Federico himself. Fixes #3789. Checked: no open PR touches the boat input (`gh pr list --search "boat paddle"`). The issue is not claimed in Kira yet (the 8-claim cap); I left a comment on it and will claim it when a slot frees. ## What and why GrimAC flags `Simulation` when a boat on land starts being paddled: the 0.04 forward acceleration is applied one tick before the paddle packet that describes it. In vanilla `LocalPlayer.rideTick` calls `AbstractBoat.setInput` after the boat ticked (the vehicle ticks first, then its passenger), so `AbstractBoat.tick` runs `controlBoat` with the keys of the previous tick and sends the paddle that matches the motion it just made. Horizon set the keys right before `tick_boat`, a tick ahead. ## Change - `game/boats.rs` `tick_riding` and `game/remote_vehicles.rs` `remote_ride` (the single player on its server thread, LAN guests and dedicated-server players use the second): tick the boat with the input already latched, then latch this tick's keys. ## Vanilla reference `AbstractBoat.tick`, `AbstractBoat.controlBoat`, `AbstractBoat.setInput`, `LocalPlayer.rideTick`. ## Testing - New `lan_e2e --check boat_input_latch` (host and guest): a boat at rest on land is paddled with W held; with the ticks counted exactly in one ctl script, the distance travelled matches the latched sequence (0 in the tick W is read, then 0.04, 0.064, ... with land friction 0.6) for 6 trials each, with varied key timing. On `main` it fails (`moved [0.0, 0.04, 0.104]`, want `[0.0, 0.0, 0.04]`: the boat moved in the tick W was read); with this change it passes. - `lan_e2e --check boat-dismount-pose` passes. `--check boats` fails with and without this change (`ten hits left the boat in place`, the break-by-fist step at the end, unrelated). - `pr_ready --quick` (Python 3.12): fmt, Python tests (423) and the `horizon-client` boat tests pass. Two failures are on `main` itself, not from this change, and each already has an open fix: clippy `log_display` unused on macOS (#3874) and `entity_nbt::axolotl_nbt_tests::bucket_cooldown_and_brain_memories_survive_and_expired_cooldown_is_removed` (#3851). They go away when those merge. 🤖 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:11: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#5267
No description provided.