diff --git a/rnex-core/src/nex/matchmake.rs b/rnex-core/src/nex/matchmake.rs index a1a1f4c..0a18f74 100644 --- a/rnex-core/src/nex/matchmake.rs +++ b/rnex-core/src/nex/matchmake.rs @@ -234,42 +234,15 @@ impl ExtendedMatchmakeSession { joining_pid == self.session.gathering.owner_pid{ continue; }*/ - /* - if other_conn.pid != self.session.gathering.host_pid { - continue; - } */ - - // for pid in &list_of_connected_pids { - other_conn - .remote - .process_notification_event(NotificationEvent { - pid_source: initiating_pid, - notif_type: 3001, - param_1: self.session.gathering.self_gid as PID, - param_2: other_conn.pid, - str_param: join_msg.clone(), - param_3: self.connected_players.len() as _, - }) - .await; - // } - } - for other_connection in conns { - let Some(other_conn) = other_connection.upgrade() else { - continue; - }; - - for old_participant in &old_particip { - let Some(old_particip) = old_participant.upgrade() else { - continue; - }; + for pid in &list_of_connected_pids { other_conn .remote .process_notification_event(NotificationEvent { pid_source: initiating_pid, notif_type: 3001, param_1: self.session.gathering.self_gid as PID, - param_2: old_particip.pid, + param_2: *pid, str_param: join_msg.clone(), param_3: self.connected_players.len() as _, }) @@ -281,9 +254,9 @@ impl ExtendedMatchmakeSession { let Some(old_conns) = old_conns.upgrade() else { continue; }; - if old_conns.pid != self.session.gathering.host_pid { + /*if old_conns.pid != self.session.gathering.host_pid { continue; - } + }*/ for new_conn_pid in conns.iter().filter_map(Weak::upgrade).map(|c| c.pid) { old_conns .remote @@ -299,6 +272,7 @@ impl ExtendedMatchmakeSession { } } } + pub fn has_active_players(&self) -> bool { self.connected_players .iter()