revert mostly back and try less big changes
This commit is contained in:
parent
9352687a4a
commit
40793af5c3
1 changed files with 5 additions and 31 deletions
|
|
@ -234,42 +234,15 @@ impl ExtendedMatchmakeSession {
|
||||||
joining_pid == self.session.gathering.owner_pid{
|
joining_pid == self.session.gathering.owner_pid{
|
||||||
continue;
|
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
|
other_conn
|
||||||
.remote
|
.remote
|
||||||
.process_notification_event(NotificationEvent {
|
.process_notification_event(NotificationEvent {
|
||||||
pid_source: initiating_pid,
|
pid_source: initiating_pid,
|
||||||
notif_type: 3001,
|
notif_type: 3001,
|
||||||
param_1: self.session.gathering.self_gid as PID,
|
param_1: self.session.gathering.self_gid as PID,
|
||||||
param_2: old_particip.pid,
|
param_2: *pid,
|
||||||
str_param: join_msg.clone(),
|
str_param: join_msg.clone(),
|
||||||
param_3: self.connected_players.len() as _,
|
param_3: self.connected_players.len() as _,
|
||||||
})
|
})
|
||||||
|
|
@ -281,9 +254,9 @@ impl ExtendedMatchmakeSession {
|
||||||
let Some(old_conns) = old_conns.upgrade() else {
|
let Some(old_conns) = old_conns.upgrade() else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
if old_conns.pid != self.session.gathering.host_pid {
|
/*if old_conns.pid != self.session.gathering.host_pid {
|
||||||
continue;
|
continue;
|
||||||
}
|
}*/
|
||||||
for new_conn_pid in conns.iter().filter_map(Weak::upgrade).map(|c| c.pid) {
|
for new_conn_pid in conns.iter().filter_map(Weak::upgrade).map(|c| c.pid) {
|
||||||
old_conns
|
old_conns
|
||||||
.remote
|
.remote
|
||||||
|
|
@ -299,6 +272,7 @@ impl ExtendedMatchmakeSession {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn has_active_players(&self) -> bool {
|
pub fn has_active_players(&self) -> bool {
|
||||||
self.connected_players
|
self.connected_players
|
||||||
.iter()
|
.iter()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue