1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 07:06:30 +09:00

Debug messages added

This commit is contained in:
lidgren
2010-08-29 11:04:45 +00:00
parent d85ca4f2fb
commit bdfdbb3601
3 changed files with 14 additions and 5 deletions

View File

@@ -139,7 +139,7 @@ namespace Lidgren.Network
m_lastPingSendTime = now;
// in case of not heard for a while
if (now > m_lastSendRespondedTo + (m_owner.Configuration.m_pingFrequency * 1.5f))
if (m_lastSendRespondedTo > 0 && (now > m_lastSendRespondedTo + (m_owner.Configuration.m_pingFrequency * 1.5f)))
m_nextPing = now + (m_owner.Configuration.m_pingFrequency * 0.5f); // double ping rate
else
m_nextPing = now + m_owner.Configuration.m_pingFrequency;
@@ -149,7 +149,6 @@ namespace Lidgren.Network
ping.Write((byte)m_lastSentPingNumber);
m_owner.SendLibraryImmediately(ping, m_remoteEndpoint);
}
}
}