Skip the world spawn trip's teleport when the respawn already put the player there

Vanilla teleports a respawning player once; the second, identical move
showed up in the dedicated_server, pearl_death and cursor_death harnesses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-27 16:35:07 +01:00
parent e350b87b3c
commit 1bd74d1b2f
@@ -423,6 +423,9 @@ impl Game<'_> {
let suggestion =
[trip.target.x, trip.target.y, trip.target.z].map(|v| v.floor() as i32);
match self.search_spawn(suggestion, &mut trip.finder) {
// The respawn already put the player on this column:
// vanilla teleports once, so no second move.
Ok(at) if host.hub.guests[i].position == [at.x, at.y, at.z] => continue,
Ok(at) => (at, yaw),
Err(chunk) => {
self.spawn_wait.push(chunk);