lidgren / lidgren-network-gen3

Lidgren Network Library
https://groups.google.com/forum/#!forum/lidgren-network-gen3
MIT License
1.19k stars 331 forks source link

NetConnection.m_sentPingTime #60

Closed forestrf closed 8 years ago

forestrf commented 8 years ago

In the class NetConnection, the variable m_sentPingTime receives a value at InitializePing() that SendPing() overwritten a little after without being readed.

What was the intention of this lines?

// 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));

Thank you

lidgren commented 8 years ago

You are correct. Removed in latest commit.