mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 13:15:44 +08:00
Patch from Johan: LibSL updated to the latest revision (1568) and all packets are now
recycled to improve performance and memory usage.
This commit is contained in:
@@ -29,6 +29,8 @@ using System.Collections.Generic;
|
||||
using libsecondlife;
|
||||
using libsecondlife.Packets;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.UserManagement;
|
||||
using OpenSim.Framework.Console;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes
|
||||
{
|
||||
@@ -164,7 +166,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
List<AvatarPickerAvatar> AvatarResponses = new List<AvatarPickerAvatar>();
|
||||
AvatarResponses = CommsManager.GenerateAgentPickerRequestResponse(RequestID, query);
|
||||
|
||||
AvatarPickerReplyPacket replyPacket = new AvatarPickerReplyPacket();
|
||||
AvatarPickerReplyPacket replyPacket = (AvatarPickerReplyPacket) PacketPool.Instance.GetPacket(PacketType.AvatarPickerReply);
|
||||
// TODO: don't create new blocks if recycling an old packet
|
||||
|
||||
AvatarPickerReplyPacket.DataBlock[] searchData =
|
||||
new AvatarPickerReplyPacket.DataBlock[AvatarResponses.Count];
|
||||
AvatarPickerReplyPacket.AgentDataBlock agentData = new AvatarPickerReplyPacket.AgentDataBlock();
|
||||
@@ -192,4 +196,4 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
client.SendAvatarPickerReply(replyPacket);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user