From bbb9a21eb5f5705215fe76b697bdcf1469dd3067 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Wed, 12 Mar 2008 18:59:50 +0000 Subject: * Fix mantis 757. * DelinkFromGroup was removing the parts from the delinked group, which later upset the update thread when it tried to do a queued update for that object * Temporary fix is to stop deleting the parts, though it would be good later to stop sending out the now spurious updates * This fix actually reveals another bug, where rapid linking and delinking will cause the non root prims to disappear (though they're actually still there if you relog). This is the next bug to tackle. --- OpenSim/Region/Environment/Scenes/InnerScene.cs | 2 +- .../Region/Environment/Scenes/Scene.Inventory.cs | 20 ------------------ OpenSim/Region/Environment/Scenes/Scene.cs | 24 ++++++++++++++++++++++ .../Region/Environment/Scenes/SceneObjectGroup.cs | 12 ++++++----- 4 files changed, 32 insertions(+), 26 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 7d21935..e195c92 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs @@ -235,7 +235,7 @@ namespace OpenSim.Region.Environment.Scenes } catch (Exception e) { - m_log.ErrorFormat("[INNERSCENE]: Failed to update {0}, {1} - {2}", entity.Name, entity.m_uuid, e); + m_log.ErrorFormat("[INNER SCENE]: Failed to update {0}, {1} - {2}", entity.Name, entity.m_uuid, e); } } m_updateList.Clear(); diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 5683a7a..78b28d5 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -806,26 +806,6 @@ namespace OpenSim.Region.Environment.Scenes } } - public void DeleteSceneObjectGroup(SceneObjectGroup group) - { - SceneObjectPart rootPart = (group).GetChildPart(group.UUID); - if (rootPart.PhysActor != null) - { - PhysicsScene.RemovePrim(rootPart.PhysActor); - rootPart.PhysActor = null; - } - - m_storageManager.DataStore.RemoveObject(group.UUID, m_regInfo.RegionID); - group.DeleteGroup(); - - lock (Entities) - { - Entities.Remove(group.UUID); - m_innerScene.RemoveAPrimCount(); - } - group.DeleteParts(); - } - public virtual void RezObject(IClientAPI remoteClient, LLUUID itemID, LLVector3 RayEnd, LLVector3 RayStart, LLUUID RayTargetID, byte BypassRayCast, bool RayEndIsIntersection, uint EveryoneMask, uint GroupMask, uint NextOwnerMask, uint ItemFlags, diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1c6efd2..1a73e78 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -2566,6 +2566,30 @@ namespace OpenSim.Region.Environment.Scenes } } } + + /// + /// Delete this object from the scene. + /// + /// + public void DeleteSceneObjectGroup(SceneObjectGroup group) + { + SceneObjectPart rootPart = (group).GetChildPart(group.UUID); + if (rootPart.PhysActor != null) + { + PhysicsScene.RemovePrim(rootPart.PhysActor); + rootPart.PhysActor = null; + } + + m_storageManager.DataStore.RemoveObject(group.UUID, m_regInfo.RegionID); + group.DeleteGroup(); + + lock (Entities) + { + Entities.Remove(group.UUID); + m_innerScene.RemoveAPrimCount(); + } + group.DeleteParts(); + } /// /// diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index b7b4f70..1a32460 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs @@ -935,8 +935,10 @@ namespace OpenSim.Region.Environment.Scenes m_scene.DeleteEntity(objectGroup.UUID); - objectGroup.DeleteParts(); - AbsolutePosition = AbsolutePosition; + // TODO justincc Left here as a remind to myself to see if we can stop sending out + // useless updates for this group once it has been deleted. + //objectGroup.DeleteParts(); + ScheduleGroupForFullUpdate(); } @@ -1021,9 +1023,9 @@ namespace OpenSim.Region.Environment.Scenes } else { - m_log.InfoFormat("[SCENE]: " + - "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", - partID, LocalId); + m_log.InfoFormat("[SCENE OBJECT GROUP]: " + + "DelinkFromGroup(): Child prim {0} not found in object {1}, {2}", + partID, LocalId, UUID); } } -- cgit v1.1