From 2007abd3dfe170abe7c4b8876b01f6d328569e86 Mon Sep 17 00:00:00 2001 From: "NG (Graham)" Date: Wed, 29 Oct 2025 20:31:34 -0400 Subject: [PATCH] Ignore client NPCs (aliased connections) when considering real players, fix #39 --- rc_multiplayer/src/matches/generic.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rc_multiplayer/src/matches/generic.rs b/rc_multiplayer/src/matches/generic.rs index 9a65f94..05ff8ae 100644 --- a/rc_multiplayer/src/matches/generic.rs +++ b/rc_multiplayer/src/matches/generic.rs @@ -705,7 +705,8 @@ impl GenericGamemodeEngine { let mut ready_count = 0; for (player_id, user) in self.users.read().await.iter() { let user_desc = self.user_descriptor(*player_id).unwrap(); - if user.user.user_id() == user_id { + if user.aliases.contains(player_id) { continue; } + if user.user.user_id() == user_id { if !matches!(ConnectionMode::from_u8(user_desc.state.mode.load(std::sync::atomic::Ordering::Relaxed)), ConnectionMode::Loading | ConnectionMode::Disconnected) { log::warn!("Got RequestLoadingSync after user {} was already in/past WaitingForSync stage", user_id); continue; @@ -718,6 +719,7 @@ impl GenericGamemodeEngine { } } let player_count = self.real_player_count(); + log::info!("Real players {}, ready players {}", player_count, ready_count); if ready_count == player_count { log::info!("All players ({}) awaiting sync for game {}", player_count, self.game_guid()); for (user_key, conn) in self.users.read().await.iter() {