diff --git a/src/ui/netplay.rs b/src/ui/netplay.rs index 543638a..cd54b7b 100644 --- a/src/ui/netplay.rs +++ b/src/ui/netplay.rs @@ -654,6 +654,7 @@ fn update_ping( if pings.len() > message.num_of_peers * 4 { // once we have enough samples, average the 3 highest values pings.sort_by(f64::total_cmp); + pings.pop(); // Remove highest value to avoid outliers let ping_avg = pings.iter().rev().take(3).sum::() / 3.0; pings.clear(); weak_app