From c8e2b011e0ecfa1101005a89c26b9c97cb9997c7 Mon Sep 17 00:00:00 2001 From: Michael Lidgren Date: Fri, 5 Feb 2016 11:44:46 +0100 Subject: [PATCH] Unnecessary code removed --- Lidgren.Network/NetConnection.Latency.cs | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Lidgren.Network/NetConnection.Latency.cs b/Lidgren.Network/NetConnection.Latency.cs index c4e0205..b7b031e 100644 --- a/Lidgren.Network/NetConnection.Latency.cs +++ b/Lidgren.Network/NetConnection.Latency.cs @@ -46,15 +46,7 @@ namespace Lidgren.Network internal void InitializePing() { - double now = NetTime.Now; - - // randomize ping sent time (0.25 - 1.0 x ping interval) - m_sentPingTime = now; - m_sentPingTime -= (m_peerConfiguration.PingInterval * 0.25f); // delay ping for a little while - m_sentPingTime -= (MWCRandom.Instance.NextSingle() * (m_peerConfiguration.PingInterval * 0.75f)); - m_timeoutDeadline = now + (m_peerConfiguration.m_connectionTimeout * 2.0); // initially allow a little more time - - // make it better, quick :-) + m_timeoutDeadline = NetTime.Now + (m_peerConfiguration.m_connectionTimeout * 2.0); // initially allow a little more time SendPing(); }