From 73f145a35c6c8666135caa15fdc37e4ba0c4ace3 Mon Sep 17 00:00:00 2001 From: Logan McNaughton <848146+loganmc10@users.noreply.github.com> Date: Sat, 6 Jun 2026 15:57:53 +0200 Subject: [PATCH] Increase ping sample size from 10 to 12 (#1022) --- src/ui/netplay.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/netplay.rs b/src/ui/netplay.rs index 8344cef0..810f697a 100644 --- a/src/ui/netplay.rs +++ b/src/ui/netplay.rs @@ -428,8 +428,8 @@ fn update_ping( .as_millis(); let ping = (now - message.timestamp) / 2; // calculate one-way latency pings.push(ping); - if pings.len() > 10 { - // once we have 10 samples, remove the highest 2 and return the next highest + if pings.len() > 12 { + // once we have at least 12 samples, remove the highest 2 and return the next highest pings.sort(); pings.truncate(pings.len() - 2); let ping = *pings.last().unwrap();