Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.
Rust differential-testinggame-enginegamedevlinuxminecraftminecraft-javareimplementationrustvoxelvulkanwgpu
Splitscreen: waiting players claim a pressed controller before P1 does
Ludovic Marie67eeb0604955
diff --git a/crates/horizon-client/src/game/split/pads.rs b/crates/horizon-client/src/game/split/pads.rsindex 351d51f41..d89b1d9bc 100644--- a/crates/horizon-client/src/game/split/pads.rs+++ b/crates/horizon-client/src/game/split/pads.rs@@ -129,6 +129,12 @@ impl Split<'_> {// the one controller pressed while P1 plays with the keyboard and mouse makes a// second player rather than taking P1's controls.let in_world = self.in_world();+ // The players waiting for a controller come first: the same kind back takes back+ // its player, another takes over the one waiting longest (`claim`). Only what that+ // passes on, with P1 the one waiting, goes to P1 here.+ if in_world && self.claim_for_lost(id, button) {+ continue;+ }let p1_waits = self.lost.iter().any(|l| l.seat == 1);let claims_p1 = p1_takes(in_world,@@ -144,9 +150,6 @@ impl Split<'_> {if !in_world {continue;}- if self.claim_for_lost(id, button) {- continue;- }match self.offers.iter().position(|(o, _)| *o == id) {Some(k) => match button {// Two pressing A together both join, in the order they pressed.diff --git a/docs/extras.md b/docs/extras.mdindex 684b7d582..e52942f8d 100644--- a/docs/extras.md+++ b/docs/extras.md@@ -179,7 +179,8 @@ and the container screen tests are unchanged).### Splitscreen (`splitscreen`, default off)**Options → Horizon Settings... → Splitscreen...** turns local joining on or off at once.-In P1's single-player world, another controller can press a button, then A to join. Each+In P1's single-player world, a controller P1 isn't using can press a button, then A to join+(or Y to play as P1, while P1 has no controller). Eachplayer picks an instance-local profile with its own options and saved progress. LB/RB onthe profile page move the view between shared positions, a new window or another monitor.A joined player's **Splitscreen Settings** in the pause menu switches profiles in place;