From f16c0318b764b950d49d51fcfbf2973c41f5dc5e Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 20 Oct 2026 21:20:40 +0200 Subject: [PATCH] fix: a new world knows its world spawn before its first save The world spawn was only filled in when the world was first saved, from the player's spawn point at that moment: a bed slept in before then became the world spawn, and anything asking for the world spawn earlier (a guest's respawn) fell back on the host's spawn point instead. Co-Authored-By: Claude Opus 5.5 (cherry picked from commit 03e621ed3af671c0ae695ea2e5b2d1a29d45c84c) --- crates/horizon-client/src/game.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/horizon-client/src/game.rs b/crates/horizon-client/src/game.rs index 460899bff..f7094351b 100644 --- a/crates/horizon-client/src/game.rs +++ b/crates/horizon-client/src/game.rs @@ -3726,6 +3726,9 @@ impl Game<'_> { f64::from(z) + 0.5, )); self.level.spawn = Some([f64::from(x), f64::from(y), f64::from(z)]); + // The world's spawn from the start, not only once saved: a bed set + // before the first save must not become it. + self.level.world_spawn.get_or_insert([x, y, z]); } let s = self .level