diff options
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs')
-rwxr-xr-x | OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs index 79f5fe6..25e4de5 100755 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLUDPServer.cs | |||
@@ -1059,7 +1059,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1059 | buf.DataLength = 12; | 1059 | buf.DataLength = 12; |
1060 | SendUDPPacket(udpClient, buf, ThrottleOutPacketType.Unknown, null, false, false); | 1060 | SendUDPPacket(udpClient, buf, ThrottleOutPacketType.Unknown, null, false, false); |
1061 | 1061 | ||
1062 | udpClient.m_lastStartpingTimeMS = Util.EnvironmentTickCount(); | 1062 | udpClient.m_lastStartpingTimeMS = Util.GetTimeStampMS(); |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | static private readonly byte[] CompletePingCheckHeader = new byte[] { | 1065 | static private readonly byte[] CompletePingCheckHeader = new byte[] { |
@@ -1506,11 +1506,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1506 | } | 1506 | } |
1507 | else if (packet.Type == PacketType.CompletePingCheck) | 1507 | else if (packet.Type == PacketType.CompletePingCheck) |
1508 | { | 1508 | { |
1509 | int t = Util.EnvironmentTickCountSubtract(udpClient.m_lastStartpingTimeMS); | 1509 | double t = Util.GetTimeStampMS() - udpClient.m_lastStartpingTimeMS; |
1510 | int c = udpClient.m_pingMS; | 1510 | double c = udpClient.m_pingMS; |
1511 | c = 800 * c + 200 * t; | 1511 | c = 800 * c + 200 * t; |
1512 | c /= 1000; | 1512 | c /= 1000; |
1513 | udpClient.m_pingMS = c; | 1513 | udpClient.m_pingMS = (int)c; |
1514 | return; | 1514 | return; |
1515 | } | 1515 | } |
1516 | 1516 | ||