From e02062051d38e56ec22952e25a558039b5e54ab3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 16 Aug 2009 16:17:19 -0700 Subject: Making attachments work again. Tons of debug more. This needs more testing and a lot of cleaning. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs') diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 3bd079a..fd13633 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -557,6 +557,7 @@ namespace OpenSim.Region.Framework.Scenes SceneObjectGroup group = GetGroupByPrim(objectLocalID); if (group != null) { + m_log.DebugFormat("[SCENE GRAPH]: AttachObject got {0}", group.UUID); if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) { // If the attachment point isn't the same as the one previously used @@ -564,6 +565,7 @@ namespace OpenSim.Region.Framework.Scenes // and not in a weird location somewhere unknown. if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint()) { + m_log.DebugFormat("[SCENE GRAPH]: AttachObject 1 got {0}", group.UUID); attachPos = Vector3.Zero; } @@ -572,7 +574,8 @@ namespace OpenSim.Region.Framework.Scenes { // Check object for stored attachment point AttachmentPt = (uint)group.GetAttachmentPoint(); - } + m_log.DebugFormat("[SCENE GRAPH]: AttachObject 2 got {0}", group.UUID); + } // if we still didn't find a suitable attachment point....... if (AttachmentPt == 0) @@ -580,8 +583,12 @@ namespace OpenSim.Region.Framework.Scenes // Stick it on left hand with Zero Offset from the attachment point. AttachmentPt = (uint)AttachmentPoint.LeftHand; attachPos = Vector3.Zero; + m_log.DebugFormat("[SCENE GRAPH]: AttachObject 3 got {0}", group.UUID); + } + m_log.DebugFormat("[SCENE GRAPH]: AttachObject 4 got {0}", group.UUID); + group.SetAttachmentPoint(Convert.ToByte(AttachmentPt)); group.AbsolutePosition = attachPos; @@ -590,10 +597,12 @@ namespace OpenSim.Region.Framework.Scenes if (group.GetFromItemID() == UUID.Zero) { + m_log.DebugFormat("[SCENE GRAPH]: AttachObject 5 got {0}", group.UUID); m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId); } else { + m_log.DebugFormat("[SCENE GRAPH]: AttachObject 6 got {0}", group.GetFromItemID()); itemId = group.GetFromItemID(); } @@ -611,6 +620,8 @@ namespace OpenSim.Region.Framework.Scenes remoteClient.SendAgentAlertMessage("You don't have sufficient permissions to attach this object", false); } } + else + m_log.DebugFormat("[SCENE GRAPH]: AttachObject found no such scene object {0}", objectLocalID); } protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance) -- cgit v1.1