remove redundant code

0.9.1.0-post-fixes
UbitUmarov 2019-03-17 19:00:02 +00:00
parent 8bb0c05825
commit 9ccca71c1b
6 changed files with 6 additions and 30 deletions

View File

@ -1097,8 +1097,6 @@ namespace OpenSim.Framework
void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures); void SendCachedTextureResponse(ISceneEntity avatar, int serial, List<CachedTextureResponseArg> cachedTextures);
void SendStartPingCheck(byte seq);
/// <summary> /// <summary>
/// Tell the client that an object has been deleted /// Tell the client that an object has been deleted
/// </summary> /// </summary>

View File

@ -1891,19 +1891,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
OutPacket(payPriceReply, ThrottleOutPacketType.Task); OutPacket(payPriceReply, ThrottleOutPacketType.Task);
} }
public void SendStartPingCheck(byte seq)
{
StartPingCheckPacket pc = (StartPingCheckPacket)PacketPool.Instance.GetPacket(PacketType.StartPingCheck);
pc.Header.Reliable = false;
pc.PingID.PingID = seq;
// We *could* get OldestUnacked, but it would hurt performance and not provide any benefit
pc.PingID.OldestUnacked = 0;
OutPacket(pc, ThrottleOutPacketType.Unknown);
UDPClient.m_lastStartpingTimeMS = Util.EnvironmentTickCount();
}
public void SendKillObject(List<uint> localIDs) public void SendKillObject(List<uint> localIDs)
{ {
// foreach (uint id in localIDs) // foreach (uint id in localIDs)
@ -8236,7 +8223,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private bool HandleAgentResume(IClientAPI sender, Packet Pack) private bool HandleAgentResume(IClientAPI sender, Packet Pack)
{ {
m_udpClient.IsPaused = false; m_udpClient.IsPaused = false;
SendStartPingCheck(m_udpClient.CurrentPingSequence++); m_udpServer.SendPing(m_udpClient);
return true; return true;
} }

View File

@ -195,7 +195,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private float m_burstTime; private float m_burstTime;
public int m_lastStartpingTimeMS; public double m_lastStartpingTimeMS;
public int m_pingMS; public int m_pingMS;
public int PingTimeMS public int PingTimeMS

View File

@ -1059,7 +1059,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
buf.DataLength = 12; buf.DataLength = 12;
SendUDPPacket(udpClient, buf, ThrottleOutPacketType.Unknown, null, false, false); SendUDPPacket(udpClient, buf, ThrottleOutPacketType.Unknown, null, false, false);
udpClient.m_lastStartpingTimeMS = Util.EnvironmentTickCount(); udpClient.m_lastStartpingTimeMS = Util.GetTimeStampMS();
} }
static private readonly byte[] CompletePingCheckHeader = new byte[] { static private readonly byte[] CompletePingCheckHeader = new byte[] {
@ -1506,11 +1506,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
} }
else if (packet.Type == PacketType.CompletePingCheck) else if (packet.Type == PacketType.CompletePingCheck)
{ {
int t = Util.EnvironmentTickCountSubtract(udpClient.m_lastStartpingTimeMS); double t = Util.GetTimeStampMS() - udpClient.m_lastStartpingTimeMS;
int c = udpClient.m_pingMS; double c = udpClient.m_pingMS;
c = 800 * c + 200 * t; c = 800 * c + 200 * t;
c /= 1000; c /= 1000;
udpClient.m_pingMS = c; udpClient.m_pingMS = (int)c;
return; return;
} }

View File

@ -967,11 +967,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
} }
public void SendStartPingCheck(byte seq)
{
}
public void SendKillObject(List<uint> localID) public void SendKillObject(List<uint> localID)
{ {

View File

@ -576,10 +576,6 @@ namespace OpenSim.Tests.Common
{ {
} }
public virtual void SendStartPingCheck(byte seq)
{
}
public virtual void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data) public virtual void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List<AvatarPickerReplyDataArgs> Data)
{ {
} }