[PR #3669] [MERGED] Controller movement on servers: the stick moves as the keys it sets do #5138

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/3669
Author: @martipops
Created: 10/29/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/stick-on-servers


📝 Commits (1)

  • 88e7afb Controller movement on servers: the stick moves as the keys it sets do

📊 Changes

4 files changed (+20 additions, -2 deletions)

View changed files

📝 crates/horizon-client/src/game/extras.rs (+4 -0)
📝 crates/horizon-client/src/game/remote.rs (+8 -1)
📝 crates/horizon-client/src/reconnect.rs (+4 -0)
📝 docs/controllers.md (+4 -1)

📄 Description

🤖 Opened by martipops's AI agent (Claude Code), not by martipops themselves.

Closes #3666.

On a server that isn't this game's own server thread (multiplayer, a LAN world joined as a guest, a friend's invite), the controller's stick now moves the player as the movement keys it sets do: 8 directions, full speed. Single player and the game's own server thread keep analog movement.

Why: a server only hears the movement keys (ServerboundPlayerInputPacket), and vanilla's client moves exactly as they do (KeyboardInput.tick). With analog movement a player walked at angles and speeds the keys can't produce, so a server or anticheat predicting movement from the keys could pull it back or flag it.

  • crates/horizon-client/src/game/remote.rs: keys.analog = None when self.integrated.is_none() && self.server_address().is_some().
  • reconnect.rs / game/extras.rs: a server_address() accessor for the last server connected to.
  • docs/controllers.md: the "Movement is analog" paragraph says so.

Also included in #3541 (splitscreen), where it came from; it drops out of that PR once this one merges.

Vanilla reference: KeyboardInput.tick (the move vector from the key flags) and ServerboundPlayerInputPacket.

pr_ready (tools/pr_ready.py --quick --base upstream/main on Mac, against upstream/main at 3c63c5913, 4 min 25 s)

Check Result
Scope ✅ 4 files, +20 −2
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 408 passed (38 s)
rustfmt ✅ (4 s)
clippy ✅ (44 s)
tests: horizon-client ✅ 804 passed (1 min 48 s)
doc tests ✅ 0 passed (22 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 ➖ 31 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 19 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/3669 **Author:** [@martipops](https://github.com/martipops) **Created:** 10/29/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/stick-on-servers` --- ### 📝 Commits (1) - [`88e7afb`](https://github.com/horizon-rust/horizon/commit/88e7afbedf26d35ce80971390ce071bb2302bb92) Controller movement on servers: the stick moves as the keys it sets do ### 📊 Changes **4 files changed** (+20 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/extras.rs` (+4 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+8 -1) 📝 `crates/horizon-client/src/reconnect.rs` (+4 -0) 📝 `docs/controllers.md` (+4 -1) </details> ### 📄 Description > 🤖 Opened by martipops's AI agent (Claude Code), not by martipops themselves. Closes #3666. On a server that isn't this game's own server thread (multiplayer, a LAN world joined as a guest, a friend's invite), the controller's stick now moves the player as the movement keys it sets do: 8 directions, full speed. Single player and the game's own server thread keep analog movement. **Why:** a server only hears the movement keys (`ServerboundPlayerInputPacket`), and vanilla's client moves exactly as they do (`KeyboardInput.tick`). With analog movement a player walked at angles and speeds the keys can't produce, so a server or anticheat predicting movement from the keys could pull it back or flag it. - `crates/horizon-client/src/game/remote.rs`: `keys.analog = None` when `self.integrated.is_none() && self.server_address().is_some()`. - `reconnect.rs` / `game/extras.rs`: a `server_address()` accessor for the last server connected to. - `docs/controllers.md`: the "Movement is analog" paragraph says so. Also included in #3541 (splitscreen), where it came from; it drops out of that PR once this one merges. **Vanilla reference:** `KeyboardInput.tick` (the move vector from the key flags) and `ServerboundPlayerInputPacket`. **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on Mac, against upstream/main at 3c63c5913, 4 min 25 s) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +20 −2 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 408 passed (38 s) | | rustfmt | ✅ (4 s) | | clippy | ✅ (44 s) | | tests: horizon-client | ✅ 804 passed (1 min 48 s) | | doc tests | ✅ 0 passed (22 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 | ➖ 31 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 19 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:10:30 +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#5138
No description provided.