aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
authorUbitUmarov2016-08-19 03:05:25 +0100
committerUbitUmarov2016-08-19 03:05:25 +0100
commit7ba3fb7b5d9c883b7a99d19f893ff6d43689b629 (patch)
tree1ea4937e30520d440979ab02e92882f6f54a3e73 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
parentfix entity update flags update (diff)
parent catch some NULL refs (diff)
downloadopensim-SC-7ba3fb7b5d9c883b7a99d19f893ff6d43689b629.zip
opensim-SC-7ba3fb7b5d9c883b7a99d19f893ff6d43689b629.tar.gz
opensim-SC-7ba3fb7b5d9c883b7a99d19f893ff6d43689b629.tar.bz2
opensim-SC-7ba3fb7b5d9c883b7a99d19f893ff6d43689b629.tar.xz
merge issue
Diffstat (limited to 'OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs60
1 files changed, 36 insertions, 24 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 6beb9b4..f580e5a 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -1711,11 +1711,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP
1711 1711
1712 public void SendKillObject(List<uint> localIDs) 1712 public void SendKillObject(List<uint> localIDs)
1713 { 1713 {
1714 // think we do need this
1715 // foreach (uint id in localIDs) 1714 // foreach (uint id in localIDs)
1716 // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, id, regionHandle); 1715 // m_log.DebugFormat("[CLIENT]: Sending KillObjectPacket to {0} for {1} in {2}", Name, id, regionHandle);
1717 1716
1718 // remove pending entities 1717 // remove pending entities to reduce looping chances.
1719 lock (m_entityProps.SyncRoot) 1718 lock (m_entityProps.SyncRoot)
1720 m_entityProps.Remove(localIDs); 1719 m_entityProps.Remove(localIDs);
1721 lock (m_entityUpdates.SyncRoot) 1720 lock (m_entityUpdates.SyncRoot)
@@ -2412,6 +2411,18 @@ namespace OpenSim.Region.ClientStack.LindenUDP
2412 OutPacket(alertPack, ThrottleOutPacketType.Task); 2411 OutPacket(alertPack, ThrottleOutPacketType.Task);
2413 } 2412 }
2414 2413
2414 public void SendAlertMessage(string message, string info)
2415 {
2416 AlertMessagePacket alertPack = (AlertMessagePacket)PacketPool.Instance.GetPacket(PacketType.AlertMessage);
2417 alertPack.AlertData = new AlertMessagePacket.AlertDataBlock();
2418 alertPack.AlertData.Message = Util.StringToBytes256(message);
2419 alertPack.AlertInfo = new AlertMessagePacket.AlertInfoBlock[1];
2420 alertPack.AlertInfo[0] = new AlertMessagePacket.AlertInfoBlock();
2421 alertPack.AlertInfo[0].Message = Util.StringToBytes256(info);
2422 alertPack.AlertInfo[0].ExtraParams = new Byte[0];
2423 OutPacket(alertPack, ThrottleOutPacketType.Task);
2424 }
2425
2415 /// <summary> 2426 /// <summary>
2416 /// Send an agent alert message to the client. 2427 /// Send an agent alert message to the client.
2417 /// </summary> 2428 /// </summary>
@@ -4007,7 +4018,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4007 bool doCulling = m_scene.ObjectsCullingByDistance; 4018 bool doCulling = m_scene.ObjectsCullingByDistance;
4008 float cullingrange = 64.0f; 4019 float cullingrange = 64.0f;
4009 HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>(); 4020 HashSet<SceneObjectGroup> GroupsNeedFullUpdate = new HashSet<SceneObjectGroup>();
4010 List<SceneObjectGroup> kills = new List<SceneObjectGroup>();
4011// Vector3 mycamera = Vector3.Zero; 4021// Vector3 mycamera = Vector3.Zero;
4012 Vector3 mypos = Vector3.Zero; 4022 Vector3 mypos = Vector3.Zero;
4013 ScenePresence mysp = (ScenePresence)SceneAgent; 4023 ScenePresence mysp = (ScenePresence)SceneAgent;
@@ -4047,8 +4057,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4047 // Don't send updates for objects that have been marked deleted. 4057 // Don't send updates for objects that have been marked deleted.
4048 // Instead send another kill object, because the first one may have gotten 4058 // Instead send another kill object, because the first one may have gotten
4049 // into a race condition 4059 // into a race condition
4050 if (!m_killRecord.Contains(grp.LocalId)) 4060 if (part == grp.RootPart && !m_killRecord.Contains(grp.LocalId))
4061 {
4051 m_killRecord.Add(grp.LocalId); 4062 m_killRecord.Add(grp.LocalId);
4063 maxUpdatesBytes -= 30;
4064 }
4052 continue; 4065 continue;
4053 } 4066 }
4054 4067
@@ -4336,16 +4349,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4336 m_killRecord.Clear(); 4349 m_killRecord.Clear();
4337 } 4350 }
4338 4351
4339 if (kills.Count > 0)
4340 {
4341 foreach(SceneObjectGroup grp in kills)
4342 {
4343 foreach(SceneObjectPart p in grp.Parts)
4344 SendEntityUpdate(p,PrimUpdateFlags.Kill);
4345 }
4346 kills.Clear();
4347 }
4348
4349 if(GroupsNeedFullUpdate.Count > 0) 4352 if(GroupsNeedFullUpdate.Count > 0)
4350 { 4353 {
4351 foreach(SceneObjectGroup grp in GroupsNeedFullUpdate) 4354 foreach(SceneObjectGroup grp in GroupsNeedFullUpdate)
@@ -4471,12 +4474,24 @@ namespace OpenSim.Region.ClientStack.LindenUDP
4471 4474
4472 if (kills.Count > 0) 4475 if (kills.Count > 0)
4473 { 4476 {
4477 List<uint> partIDs = new List<uint>();
4474 foreach(SceneObjectGroup grp in kills) 4478 foreach(SceneObjectGroup grp in kills)
4475 { 4479 {
4480 SendEntityUpdate(grp.RootPart,PrimUpdateFlags.Kill);
4476 foreach(SceneObjectPart p in grp.Parts) 4481 foreach(SceneObjectPart p in grp.Parts)
4477 SendEntityUpdate(p,PrimUpdateFlags.Kill); 4482 {
4483 if(p != grp.RootPart)
4484 partIDs.Add(p.LocalId);
4485 }
4478 } 4486 }
4479 kills.Clear(); 4487 kills.Clear();
4488 if(partIDs.Count > 0)
4489 {
4490 lock (m_entityProps.SyncRoot)
4491 m_entityProps.Remove(partIDs);
4492 lock (m_entityUpdates.SyncRoot)
4493 m_entityUpdates.Remove(partIDs);
4494 }
4480 } 4495 }
4481 4496
4482 if(GroupsNeedFullUpdate.Count > 0) 4497 if(GroupsNeedFullUpdate.Count > 0)
@@ -11418,12 +11433,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11418 m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID); 11433 m_GroupsModule.GroupMembersRequest(this, groupMembersRequestPacket.GroupData.GroupID);
11419 11434
11420 int memberCount = members.Count; 11435 int memberCount = members.Count;
11421 11436 int indx = 0;
11422 while (true) 11437 while (indx < memberCount)
11423 { 11438 {
11424 int blockCount = members.Count; 11439 int blockCount = memberCount - indx;
11425 if (blockCount > 40) 11440 if (blockCount > 25)
11426 blockCount = 40; 11441 blockCount = 25;
11427 11442
11428 GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply); 11443 GroupMembersReplyPacket groupMembersReply = (GroupMembersReplyPacket)PacketPool.Instance.GetPacket(PacketType.GroupMembersReply);
11429 11444
@@ -11444,8 +11459,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11444 11459
11445 for (int i = 0; i < blockCount; i++) 11460 for (int i = 0; i < blockCount; i++)
11446 { 11461 {
11447 GroupMembersData m = members[0]; 11462 GroupMembersData m = members[indx++];
11448 members.RemoveAt(0);
11449 11463
11450 groupMembersReply.MemberData[i] = 11464 groupMembersReply.MemberData[i] =
11451 new GroupMembersReplyPacket.MemberDataBlock(); 11465 new GroupMembersReplyPacket.MemberDataBlock();
@@ -11463,8 +11477,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP
11463 m.IsOwner; 11477 m.IsOwner;
11464 } 11478 }
11465 OutPacket(groupMembersReply, ThrottleOutPacketType.Task); 11479 OutPacket(groupMembersReply, ThrottleOutPacketType.Task);
11466 if (members.Count == 0)
11467 return true;
11468 } 11480 }
11469 } 11481 }
11470 return true; 11482 return true;