From a3a17e929e7a39566a677672572433fe35d25849 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 16 Dec 2011 23:20:12 +0000 Subject: Stop generating client flags when we send out full object updates. These were entirely unused. --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index f9e0b83..20ef8c9 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1377,15 +1377,14 @@ namespace OpenSim.Region.Framework.Scenes // Used when the client initially connects and when client sends RequestPrim packet public void SendFullUpdateToClient(IClientAPI remoteClient) { - RootPart.SendFullUpdate( - remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, RootPart.UUID)); + RootPart.SendFullUpdate(remoteClient); SceneObjectPart[] parts = m_parts.GetArray(); for (int i = 0; i < parts.Length; i++) { SceneObjectPart part = parts[i]; if (part != RootPart) - part.SendFullUpdate(remoteClient, m_scene.Permissions.GenerateClientFlags(remoteClient.AgentId, part.UUID)); + part.SendFullUpdate(remoteClient); } } -- cgit v1.1 From 1bf05fbb1f8cc4832d8c8963556d8082181f810a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 17 Dec 2011 00:11:17 +0000 Subject: refactor: simplify methods in Scene.PacketHandlers.cs by using GetGroupByPrim() rather than retrieving GetEntities() and inspecting the entire list --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 20ef8c9..7bf8c34 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1373,8 +1373,13 @@ namespace OpenSim.Region.Framework.Scenes #endregion - // Send the parts of this SOG to a single client - // Used when the client initially connects and when client sends RequestPrim packet + /// + /// Send the parts of this SOG to a single client + /// + /// + /// Used when the client initially connects and when client sends RequestPrim packet + /// + /// public void SendFullUpdateToClient(IClientAPI remoteClient) { RootPart.SendFullUpdate(remoteClient); @@ -1678,10 +1683,11 @@ namespace OpenSim.Region.Framework.Scenes /// /// Reset the UUIDs for all the prims that make up this group. - /// + /// + /// /// This is called by methods which want to add a new group to an existing scene, in order /// to ensure that there are no clashes with groups already present. - /// + /// public void ResetIDs() { lock (m_parts.SyncRoot) -- cgit v1.1 From f9137c923bcdc952efe37c7dd328c2d0d8323317 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 17 Dec 2011 02:23:24 +0000 Subject: Fix bug where objects could not be set to a new group if the group had been created in that client session, or if no other action has been performed on the object. There were two problems here: 1) On object group update, we looked for the group is the IClientAPI group cache rather than in the groups service. This fails to groups created newly in that session 2) On object group update, we weren't setting the HasGroupChanged flag. This meant that the change was not persisted unless some other action set this flag. This commit fixes these issues and hopefully addresses http://opensimulator.org/mantis/view.php?id=5588 This commit also moves HandleObjectGroupUpdate() to the GroupsModule from the Scene.PacketHandlers.cs file --- OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 7bf8c34..abea788 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -3211,6 +3211,8 @@ namespace OpenSim.Region.Framework.Scenes part.Inventory.ChangeInventoryGroup(GroupID); } + HasGroupChanged = true; + // Don't trigger the update here - otherwise some client issues occur when multiple updates are scheduled // for the same object with very different properties. The caller must schedule the update. //ScheduleGroupForFullUpdate(); -- cgit v1.1