changes on updates
parent
cf89799c0b
commit
817b622b79
|
@ -5732,7 +5732,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2;
|
Utils.UInt16ToBytes(Utils.FloatToUInt16(angularVelocity.Z, -64.0f, 64.0f), data, pos); pos += 2;
|
||||||
|
|
||||||
ImprovedTerseObjectUpdatePacket.ObjectDataBlock block
|
ImprovedTerseObjectUpdatePacket.ObjectDataBlock block
|
||||||
= PacketPool.Instance.GetDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>();
|
= new ImprovedTerseObjectUpdatePacket.ObjectDataBlock();
|
||||||
|
|
||||||
block.Data = data;
|
block.Data = data;
|
||||||
block.TextureEntry = Utils.EmptyBytes;
|
block.TextureEntry = Utils.EmptyBytes;
|
||||||
|
|
|
@ -855,7 +855,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method)
|
LLUDPClient udpClient, Packet packet, ThrottleOutPacketType category, bool allowSplitting, UnackedPacketMethod method)
|
||||||
{
|
{
|
||||||
// CoarseLocationUpdate packets cannot be split in an automated way
|
// CoarseLocationUpdate packets cannot be split in an automated way
|
||||||
if (allowSplitting && packet.HasVariableBlocks && packet.Type != PacketType.CoarseLocationUpdate)
|
if (allowSplitting && packet.HasVariableBlocks && packet.Type != PacketType.CoarseLocationUpdate &&
|
||||||
|
packet.Length + 20 > MTU)
|
||||||
{
|
{
|
||||||
byte[][] datas = packet.ToBytesMultiple();
|
byte[][] datas = packet.ToBytesMultiple();
|
||||||
int packetCount = datas.Length;
|
int packetCount = datas.Length;
|
||||||
|
|
|
@ -55,8 +55,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
public bool RecyclePackets { get; set; }
|
public bool RecyclePackets { get; set; }
|
||||||
|
|
||||||
public bool RecycleDataBlocks { get; set; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The number of packets pooled
|
/// The number of packets pooled
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -105,8 +103,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
// defaults
|
// defaults
|
||||||
RecyclePackets = true;
|
RecyclePackets = true;
|
||||||
// RecycleDataBlocks = true;
|
|
||||||
RecycleDataBlocks = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -209,32 +205,23 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
case PacketType.ObjectUpdate:
|
case PacketType.ObjectUpdate:
|
||||||
ObjectUpdatePacket oup = (ObjectUpdatePacket)packet;
|
ObjectUpdatePacket oup = (ObjectUpdatePacket)packet;
|
||||||
|
|
||||||
if (RecycleDataBlocks)
|
|
||||||
{
|
|
||||||
foreach (ObjectUpdatePacket.ObjectDataBlock oupod in oup.ObjectData)
|
|
||||||
ReturnDataBlock<ObjectUpdatePacket.ObjectDataBlock>(oupod);
|
|
||||||
}
|
|
||||||
|
|
||||||
oup.ObjectData = null;
|
oup.ObjectData = null;
|
||||||
trypool = true;
|
trypool = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.ImprovedTerseObjectUpdate:
|
case PacketType.ImprovedTerseObjectUpdate:
|
||||||
ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet;
|
ImprovedTerseObjectUpdatePacket itoup = (ImprovedTerseObjectUpdatePacket)packet;
|
||||||
|
|
||||||
if (RecycleDataBlocks)
|
|
||||||
{
|
|
||||||
foreach (ImprovedTerseObjectUpdatePacket.ObjectDataBlock itoupod in itoup.ObjectData)
|
|
||||||
ReturnDataBlock<ImprovedTerseObjectUpdatePacket.ObjectDataBlock>(itoupod);
|
|
||||||
}
|
|
||||||
|
|
||||||
itoup.ObjectData = null;
|
itoup.ObjectData = null;
|
||||||
trypool = true;
|
trypool = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PacketType.AgentUpdate:
|
|
||||||
case PacketType.PacketAck:
|
case PacketType.PacketAck:
|
||||||
|
PacketAckPacket ackup = (PacketAckPacket)packet;
|
||||||
|
ackup.Packets = null;
|
||||||
|
trypool = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PacketType.AgentUpdate:
|
||||||
trypool = true;
|
trypool = true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue