mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 11:00:32 +00:00
Shortened PingWindowSize to get a faster more accurate result. (#3395)
* Shortened PingWindowSize to get a faster more accurate result. Shortened PingWindowSize to get a faster more accurate result. It taking too long to calculate the average may look bad to users * Revert "Shortened PingWindowSize to get a faster more accurate result." This reverts commit0a5916b4dc
. * Revert "Shortened PingWindowSize to get a faster more accurate result." This reverts commit0a5916b4dc
. * Shortened PingWindowSize to get a faster more accurate result. Shortened PingWindowSize to get a faster more accurate result. It taking too long to calculate the average may look bad to users * Shortened PingWindowSize to get a faster more accurate result. Shortened PingWindowSize to get a faster more accurate result. It taking too long to calculate the average may look bad to users, choosing 6 gives us an average of 3 results, where as the previous 10, would wait for 5, it should be a slight visual improvement.
This commit is contained in:
parent
228a577683
commit
4603bb1a4d
@ -19,7 +19,7 @@ public static class NetworkTime
|
||||
public static float PingFrequency = 2;
|
||||
|
||||
/// <summary>Average out the last few results from Ping</summary>
|
||||
public static int PingWindowSize = 10;
|
||||
public static int PingWindowSize = 6;
|
||||
|
||||
static double lastPingTime;
|
||||
|
||||
@ -74,7 +74,7 @@ public static double time
|
||||
public static void ResetStatics()
|
||||
{
|
||||
PingFrequency = 2;
|
||||
PingWindowSize = 10;
|
||||
PingWindowSize = 6;
|
||||
lastPingTime = 0;
|
||||
_rtt = new ExponentialMovingAverage(PingWindowSize);
|
||||
#if !UNITY_2020_3_OR_NEWER
|
||||
|
Loading…
Reference in New Issue
Block a user