From 38cfc9366ce264d2aeb6409df48be7cecc348952 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 25 Jan 2010 21:51:58 +0000 Subject: Fix a problem where llDie() calls were sometimes leaving dead objects behind. When an object was deleted, the remove script instance call was aggregating the scripting events as normal. This would queue a full update of the prim before the viewer was notifed of the deletion of that prim (QuitPacket) On some occasions, the QuitPacket would be sent before the full update was dequeued and sent. In principle, you would think that a viewer would ignore updates for deleted prims. But it appears that in the Linden viewer (1.23.5), a prim update that arrives after the prim was deleted instead makes the deleted prim persist in the viewer. Such prims have no properties and cannot be removed from the viewer except by a relog. This change stops the prim event aggregation call if it's being deleted anyway, hence removing the spurious viewer-confusing update. --- OpenSim/Region/Framework/Scenes/Scene.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 234554e..4da05cf 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1009,7 +1009,7 @@ namespace OpenSim.Region.Framework.Scenes { if (ent is SceneObjectGroup) { - ((SceneObjectGroup) ent).RemoveScriptInstances(); + ((SceneObjectGroup) ent).RemoveScriptInstances(false); } } } @@ -1884,13 +1884,15 @@ namespace OpenSim.Region.Framework.Scenes /// Suppress broadcasting changes to other clients. public void DeleteSceneObject(SceneObjectGroup group, bool silent) { +// m_log.DebugFormat("[SCENE]: Deleting scene object {0} {1}", group.Name, group.UUID); + //SceneObjectPart rootPart = group.GetChildPart(group.UUID); // Serialise calls to RemoveScriptInstances to avoid // deadlocking on m_parts inside SceneObjectGroup lock (m_deleting_scene_object) { - group.RemoveScriptInstances(); + group.RemoveScriptInstances(true); } foreach (SceneObjectPart part in group.Children.Values) @@ -1918,6 +1920,8 @@ namespace OpenSim.Region.Framework.Scenes } group.DeleteGroup(silent); + +// m_log.DebugFormat("[SCENE]: Exit DeleteSceneObject() for {0} {1}", group.Name, group.UUID); } /// -- cgit v1.1 From 05a3e37b853fc870b83eb67b47bc70eb724f652e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 29 Jan 2010 23:12:08 +0000 Subject: Apply http://opensimulator.org/mantis/view.php?id=3334 Send continuous touch() events if the left mouse button is held down while moving over an object This conforms with Linden Lab practice Thanks Revolution --- OpenSim/Region/Framework/Scenes/Scene.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 4da05cf..73b0b3e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2675,6 +2675,7 @@ namespace OpenSim.Region.Framework.Scenes client.OnRequestObjectPropertiesFamily += m_sceneGraph.RequestObjectPropertiesFamily; client.OnObjectPermissions += HandleObjectPermissionsUpdate; client.OnGrabObject += ProcessObjectGrab; + client.OnGrabUpdate += ProcessObjectGrabUpdate; client.OnDeGrabObject += ProcessObjectDeGrab; client.OnUndo += m_sceneGraph.HandleUndo; client.OnObjectDescription += m_sceneGraph.PrimDescription; -- cgit v1.1 From b6bee4999c9d238a052022f105069ea4eb85f8f4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 3 Feb 2010 15:35:41 +0000 Subject: change position of OnAttach event firing so that this also happens when a user teleports into a region --- OpenSim/Region/Framework/Scenes/Scene.cs | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 73b0b3e..ff2be05 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2496,20 +2496,24 @@ namespace OpenSim.Region.Framework.Scenes //RootPrim.SetParentLocalId(parentLocalID); - m_log.DebugFormat("[ATTACHMENT]: Received " + - "attachment {0}, inworld asset id {1}", - //grp.RootPart.LastOwnerID.ToString(), - grp.GetFromItemID(), - grp.UUID.ToString()); + m_log.DebugFormat( + "[ATTACHMENT]: Received attachment {0}, inworld asset id {1}", + //grp.RootPart.LastOwnerID.ToString(), + grp.GetFromItemID(), + grp.UUID.ToString()); //grp.SetFromAssetID(grp.RootPart.LastOwnerID); - m_log.DebugFormat("[ATTACHMENT]: Attach " + - "to avatar {0} at position {1}", - sp.UUID.ToString(), grp.AbsolutePosition); - AttachObject(sp.ControllingClient, - grp.LocalId, (uint)0, - grp.GroupRotation, - grp.AbsolutePosition, false); + m_log.DebugFormat( + "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID.ToString(), grp.AbsolutePosition); + + if ( + AttachObject( + sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false)) + { + // Do this last so that event listeners have access to all the effects of the attachment + EventManager.TriggerOnAttach(grp.LocalId, UUID.Zero, sp.UUID); + } + RootPrim.RemFlag(PrimFlags.TemporaryOnRez); grp.SendGroupFullUpdate(); } @@ -2518,7 +2522,6 @@ namespace OpenSim.Region.Framework.Scenes RootPrim.RemFlag(PrimFlags.TemporaryOnRez); RootPrim.AddFlag(PrimFlags.TemporaryOnRez); } - } else { -- cgit v1.1 From 2953bee1f4443e041dbce38d042f6ed421d30533 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 4 Feb 2010 17:11:06 +0000 Subject: Revert "change position of OnAttach event firing so that this also happens when a user teleports into a region" The behavior introduced here is not compatible with SL This reverts commit b6bee4999c9d238a052022f105069ea4eb85f8f4. --- OpenSim/Region/Framework/Scenes/Scene.cs | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ff2be05..73b0b3e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2496,24 +2496,20 @@ namespace OpenSim.Region.Framework.Scenes //RootPrim.SetParentLocalId(parentLocalID); - m_log.DebugFormat( - "[ATTACHMENT]: Received attachment {0}, inworld asset id {1}", - //grp.RootPart.LastOwnerID.ToString(), - grp.GetFromItemID(), - grp.UUID.ToString()); + m_log.DebugFormat("[ATTACHMENT]: Received " + + "attachment {0}, inworld asset id {1}", + //grp.RootPart.LastOwnerID.ToString(), + grp.GetFromItemID(), + grp.UUID.ToString()); //grp.SetFromAssetID(grp.RootPart.LastOwnerID); - m_log.DebugFormat( - "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID.ToString(), grp.AbsolutePosition); - - if ( - AttachObject( - sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false)) - { - // Do this last so that event listeners have access to all the effects of the attachment - EventManager.TriggerOnAttach(grp.LocalId, UUID.Zero, sp.UUID); - } - + m_log.DebugFormat("[ATTACHMENT]: Attach " + + "to avatar {0} at position {1}", + sp.UUID.ToString(), grp.AbsolutePosition); + AttachObject(sp.ControllingClient, + grp.LocalId, (uint)0, + grp.GroupRotation, + grp.AbsolutePosition, false); RootPrim.RemFlag(PrimFlags.TemporaryOnRez); grp.SendGroupFullUpdate(); } @@ -2522,6 +2518,7 @@ namespace OpenSim.Region.Framework.Scenes RootPrim.RemFlag(PrimFlags.TemporaryOnRez); RootPrim.AddFlag(PrimFlags.TemporaryOnRez); } + } else { -- cgit v1.1