From 8a309c393dcff4adf462bebc6a9c3e23c65ee8de Mon Sep 17 00:00:00 2001 From: Kacpherek Date: Mon, 26 Oct 2026 19:50:50 +0100 Subject: [PATCH] Show join and leave messages in a LAN host's own chat --- crates/horizon-client/src/game/lan.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/crates/horizon-client/src/game/lan.rs b/crates/horizon-client/src/game/lan.rs index 5292cd31b..19658cdf2 100644 --- a/crates/horizon-client/src/game/lan.rs +++ b/crates/horizon-client/src/game/lan.rs @@ -1026,6 +1026,16 @@ impl Game<'_> { "INFO", &format!("System chat: {} joined the game", g.name), ); + } else if self.player.is_some() + && let Some(g) = host.hub.guest(conn) + && g.placed + { + // The host's chat hears of the newcomer as the guests do. + let who = self.player_text(&g.name, g.uuid); + self.system_message( + Text::translate("multiplayer.player.joined", &[who]) + .with_color(horizon_client::text::YELLOW), + ); } } HostEvent::Left(mut guest) => { @@ -1057,6 +1067,13 @@ impl Game<'_> { "INFO", &format!("System chat: {} left the game", guest.name), ); + } else if self.player.is_some() && guest.placed { + // ServerGamePacketListenerImpl.removePlayerFromWorld. + let who = self.player_text(&guest.name, guest.uuid); + self.system_message( + Text::translate("multiplayer.player.left", &[who]) + .with_color(horizon_client::text::YELLOW), + ); } } HostEvent::Packet(conn, packet) => {