avoid automatic packet spliting in GroupMembersReply

LSLKeyTest
UbitUmarov 2016-08-12 18:47:01 +01:00
parent 9080aaf9eb
commit 09832edadf
1 changed files with 19 additions and 10 deletions

View File

@ -4462,12 +4462,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (kills.Count > 0) if (kills.Count > 0)
{ {
List<uint> partIDs = new List<uint>();
foreach(SceneObjectGroup grp in kills) foreach(SceneObjectGroup grp in kills)
{ {
SendEntityUpdate(grp.RootPart,PrimUpdateFlags.Kill);
foreach(SceneObjectPart p in grp.Parts) foreach(SceneObjectPart p in grp.Parts)
SendEntityUpdate(p,PrimUpdateFlags.Kill); {
if(p != grp.RootPart)
partIDs.Add(p.LocalId);
}
} }
kills.Clear(); kills.Clear();
if(partIDs.Count > 0)
{
lock (m_entityProps.SyncRoot)
m_entityProps.Remove(partIDs);
lock (m_entityUpdates.SyncRoot)
m_entityUpdates.Remove(partIDs);
}
} }
if(GroupsNeedFullUpdate.Count > 0) if(GroupsNeedFullUpdate.Count > 0)
@ -11409,12 +11421,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID); m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID);
int memberCount = members.Count; int memberCount = members.Count;
int indx = 0;
while (true) while (indx < memberCount)
{ {
int blockCount = members.Count; int blockCount = memberCount - indx;
if (blockCount > 40) if (blockCount > 25)
blockCount = 40; blockCount = 25;
GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply); GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply);
@ -11435,8 +11447,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
for (int i = 0; i < blockCount; i++) for (int i = 0; i < blockCount; i++)
{ {
GroupMembersData m = members[0]; GroupMembersData m = members[indx++];
members.RemoveAt(0);
groupMembersReply.MemberData[i] = groupMembersReply.MemberData[i] =
new GroupMembersReplyPacket.MemberDataBlock(); new GroupMembersReplyPacket.MemberDataBlock();
@ -11454,8 +11465,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m.IsOwner; m.IsOwner;
} }
OutPacket(groupMembersReply, ThrottleOutPacketType.Task); OutPacket(groupMembersReply, ThrottleOutPacketType.Task);
if (members.Count == 0)
return true;
} }
} }
return true; return true;