pub fn update_connection_info(
    mut con_info: ResMut<ConnectionInfo>,
    session: ResMut<P2PSession<GGRSConfig>>,
    local_handles: Res<LocalHandles>,
) {
    for handle in 0..NUM_PLAYERS {
        if local_handles.handles.contains(&handle) {
            continue;
        }
        if let Ok(stats) = session.network_stats(handle) {
            con_info.ping = stats.ping;
        }
    }
}
// TODO: for now, this assumes only a single remote player
for now, this assumes only a single remote player
for now this assumes only a single remote player
pub fn update_connection_info(
    mut con_info: ResMut<ConnectionInfo>,
    session: ResMut<P2PSession<GGRSConfig>>,
    local_handles: Res<LocalHandles>,
) {
    for handle in 0..NUM_PLAYERS {
        if local_handles.handles.contains(&handle) {
            continue;
        }
        if let Ok(stats) = session.network_stats(handle) {
            con_info.ping = stats.ping;
        }
    }
}
pub fn update_connection_info ( mut con_info : ResMut < ConnectionInfo > , session : ResMut < P2PSession < GGRSConfig > > , local_handles : Res < LocalHandles > , ) { for handle in 0 .. NUM_PLAYERS { if local_handles . handles . contains ( & handle ) { continue ; } if let Ok ( stats ) = session . network_stats ( handle ) { con_info . ping = stats . ping ; } } }
TODO: for now, this assumes only a single remote player
TODO : for now this assumes only a single remote player
con_info
ResMut<ConnectionInfo>
session
ResMut<P2PSession<GGRSConfig>>
local_handles
Res<LocalHandles>
con_info
ResMut<ConnectionInfo>
session
ResMut<P2PSession<GGRSConfig>>
local_handles
Res<LocalHandles>