From 4475b3db2774073d1ab430bc8aa33b310f5fff2e Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 10 Apr 2019 14:01:10 +0100 Subject: [PATCH] degradate udp network efficiency a even more --- OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 7dfcc7a918..988f5478d6 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -1672,7 +1672,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { s = 2 * i; OpenSimTerrainCompressor.CreatePatchFromTerrainData(bitpack, terrData, map[s], map[s + 1]); - if (bitpack.BytePos > 950 && i != numberPatchs - 1) + if (bitpack.BytePos > 900 && i != numberPatchs - 1) { //finish this packet bitpack.PackBitsFromByte(END_OF_PATCHES); @@ -5100,7 +5100,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP if(objectUpdates != null) { - int blocks = objectUpdates.Count; List tau = new List(30); UDPPacketBuffer buf = m_udpServer.GetNewUDPBuffer(m_udpClient.RemoteEndPoint); @@ -5141,13 +5140,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP } CreatePrimUpdateBlock(part, mysp, zc); } - if (zc.Position < LLUDPServer.MAXPAYLOAD - 200) + if (zc.Position < LLUDPServer.MAXPAYLOAD - 300) { tau.Add(eu); ++count; - --blocks; } - else if (blocks > 0) + else { // we need more packets UDPPacketBuffer newbuf = m_udpServer.GetNewUDPBuffer(m_udpClient.RemoteEndPoint); @@ -5179,7 +5177,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP tau = new List(30); tau.Add(eu); count = 1; - --blocks; } }