From 9bf67201c31d531e0480e67d8a96472d0a5b0c76 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 27 Jun 2008 16:36:19 +0000 Subject: * Remove responsibilty for signalling scene object change from SceneObjectPart.SendFullUpdate() * This means that we will no longer pointlessly repersist all the prims in the scene when OpenSim first starts up * This also means that force-update on the console will not trigger repersistence. * Also, in other places persistence is no longer done where it wasn't actually necessary * I think I changed the code for all instances correctly, but it's not possible that I missed some and some things which did persist properly have stopped * Please patch or mantis if this is the case --- .../Region/Environment/Scenes/SceneObjectGroup.cs | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index b903674..74f9d6c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -477,6 +477,7 @@ namespace OpenSim.Region.Environment.Scenes newPart.LinkNum = m_parts.Count; m_parts.Add(newPart.UUID, newPart); SetPartAsRoot(newPart); + // one of these is a proxy. if (shape.PCode != (byte)PCode.None && shape.PCode != (byte)PCode.ParticleSystem) AttachToBackup(); @@ -686,7 +687,12 @@ namespace OpenSim.Region.Environment.Scenes m_rootPart = part; } - + /// + /// Attach this scene object to the given avatar. + /// + /// + /// + /// public void AttachToAgent(LLUUID agentID, uint attachmentpoint, LLVector3 AttachOffset) { ScenePresence avatar = m_scene.GetScenePresence(agentID); @@ -752,6 +758,7 @@ namespace OpenSim.Region.Environment.Scenes m_rootPart.SetAttachmentPoint((byte)0); m_rootPart.m_IsAttachment = false; m_rootPart.ApplyPhysics(m_rootPart.GetEffectiveObjectFlags(), m_scene.m_physicalPrim); + HasGroupChanged = true; AttachToBackup(); m_rootPart.ScheduleFullUpdate(); m_rootPart.ClearUndoState(); @@ -1026,6 +1033,7 @@ namespace OpenSim.Region.Environment.Scenes lock (m_targets) m_targets.Clear(); } + ScheduleGroupForFullUpdate(); } @@ -1037,6 +1045,7 @@ namespace OpenSim.Region.Environment.Scenes (int) (color.z * 0xff)); Text = text; + HasGroupChanged = true; m_rootPart.ScheduleFullUpdate(); } @@ -1229,6 +1238,7 @@ namespace OpenSim.Region.Environment.Scenes dupe.RootPart.DoPhysicsPropertyUpdate(dupe.RootPart.PhysActor.IsPhysical, true); } + // Now we've made a copy that replaces this one, we need to // switch the owner to the person who did the copying // Second Life copies an object and duplicates the first one in it's place @@ -1257,8 +1267,9 @@ namespace OpenSim.Region.Environment.Scenes if (userExposed) { dupe.UpdateParentIDs(); - + dupe.HasGroupChanged = true; dupe.AttachToBackup(); + ScheduleGroupForFullUpdate(); } @@ -1386,7 +1397,6 @@ namespace OpenSim.Region.Environment.Scenes part.OwnerID = cAgentID; part.GroupID = cGroupID; - if (part.OwnerID != cAgentID) { // Apply Next Owner Permissions if we're not bypassing permissions @@ -1535,7 +1545,6 @@ namespace OpenSim.Region.Environment.Scenes /// public void ScheduleGroupForFullUpdate() { - HasGroupChanged = true; checkAtTargets(); lock (m_parts) { @@ -1774,6 +1783,7 @@ namespace OpenSim.Region.Environment.Scenes // The traffic caused is always going to be pretty minor, so it's not high priority //objectGroup.DeleteGroup(); + HasGroupChanged = true; ScheduleGroupForFullUpdate(); } @@ -1834,6 +1844,7 @@ namespace OpenSim.Region.Environment.Scenes m_scene.AddNewSceneObject(objectGroup, true); + HasGroupChanged = true; ScheduleGroupForFullUpdate(); } else @@ -2112,6 +2123,8 @@ namespace OpenSim.Region.Environment.Scenes m_scene.PhysicsScene.AddPhysicsActorTaint(part.PhysActor); } //if (part.UUID != m_rootPart.UUID) + + HasGroupChanged = true; ScheduleGroupForFullUpdate(); //if (part.UUID == m_rootPart.UUID) @@ -2552,6 +2565,8 @@ namespace OpenSim.Region.Environment.Scenes { part.SetGroup(GroupID, client); } + + HasGroupChanged = true; } ScheduleGroupForFullUpdate(); -- cgit v1.1