aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorDiva Canto2009-08-16 17:11:20 -0700
committerDiva Canto2009-08-16 17:11:20 -0700
commit5d47e08dada2b4de1170b9adb4cca5cd51593cc9 (patch)
tree8ff013f53954afb5ba530b7175896a85b082e2a0 /OpenSim/Region/Framework
parentMaking attachments work again. Tons of debug more. This needs more testing an... (diff)
downloadopensim-SC_OLD-5d47e08dada2b4de1170b9adb4cca5cd51593cc9.zip
opensim-SC_OLD-5d47e08dada2b4de1170b9adb4cca5cd51593cc9.tar.gz
opensim-SC_OLD-5d47e08dada2b4de1170b9adb4cca5cd51593cc9.tar.bz2
opensim-SC_OLD-5d47e08dada2b4de1170b9adb4cca5cd51593cc9.tar.xz
Removed some debug messages
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs6
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs7
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs36
3 files changed, 7 insertions, 42 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index f475c64..d1f7a4b 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -2052,8 +2052,10 @@ namespace OpenSim.Region.Framework.Scenes
2052 2052
2053 ScenePresence sp = CreateAndAddScenePresence(client); 2053 ScenePresence sp = CreateAndAddScenePresence(client);
2054 2054
2055 // HERE!!! Do the initial attachments here 2055 // HERE!!! Do the initial attachments right here
2056 if (aCircuit.child == false) // first agent upon login is root agent 2056 // first agent upon login is a root agent by design.
2057 // All other AddNewClient calls find aCircuit.child to be true
2058 if (aCircuit.child == false)
2057 { 2059 {
2058 sp.IsChildAgent = false; 2060 sp.IsChildAgent = false;
2059 sp.RezAttachments(); 2061 sp.RezAttachments();
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index fd13633..3007598 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -557,7 +557,6 @@ namespace OpenSim.Region.Framework.Scenes
557 SceneObjectGroup group = GetGroupByPrim(objectLocalID); 557 SceneObjectGroup group = GetGroupByPrim(objectLocalID);
558 if (group != null) 558 if (group != null)
559 { 559 {
560 m_log.DebugFormat("[SCENE GRAPH]: AttachObject got {0}", group.UUID);
561 if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId)) 560 if (m_parentScene.Permissions.CanTakeObject(group.UUID, remoteClient.AgentId))
562 { 561 {
563 // If the attachment point isn't the same as the one previously used 562 // If the attachment point isn't the same as the one previously used
@@ -565,7 +564,6 @@ namespace OpenSim.Region.Framework.Scenes
565 // and not in a weird location somewhere unknown. 564 // and not in a weird location somewhere unknown.
566 if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint()) 565 if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint())
567 { 566 {
568 m_log.DebugFormat("[SCENE GRAPH]: AttachObject 1 got {0}", group.UUID);
569 attachPos = Vector3.Zero; 567 attachPos = Vector3.Zero;
570 } 568 }
571 569
@@ -574,7 +572,6 @@ namespace OpenSim.Region.Framework.Scenes
574 { 572 {
575 // Check object for stored attachment point 573 // Check object for stored attachment point
576 AttachmentPt = (uint)group.GetAttachmentPoint(); 574 AttachmentPt = (uint)group.GetAttachmentPoint();
577 m_log.DebugFormat("[SCENE GRAPH]: AttachObject 2 got {0}", group.UUID);
578 } 575 }
579 576
580 // if we still didn't find a suitable attachment point....... 577 // if we still didn't find a suitable attachment point.......
@@ -583,11 +580,9 @@ namespace OpenSim.Region.Framework.Scenes
583 // Stick it on left hand with Zero Offset from the attachment point. 580 // Stick it on left hand with Zero Offset from the attachment point.
584 AttachmentPt = (uint)AttachmentPoint.LeftHand; 581 AttachmentPt = (uint)AttachmentPoint.LeftHand;
585 attachPos = Vector3.Zero; 582 attachPos = Vector3.Zero;
586 m_log.DebugFormat("[SCENE GRAPH]: AttachObject 3 got {0}", group.UUID);
587 583
588 } 584 }
589 585
590 m_log.DebugFormat("[SCENE GRAPH]: AttachObject 4 got {0}", group.UUID);
591 586
592 group.SetAttachmentPoint(Convert.ToByte(AttachmentPt)); 587 group.SetAttachmentPoint(Convert.ToByte(AttachmentPt));
593 group.AbsolutePosition = attachPos; 588 group.AbsolutePosition = attachPos;
@@ -597,12 +592,10 @@ namespace OpenSim.Region.Framework.Scenes
597 592
598 if (group.GetFromItemID() == UUID.Zero) 593 if (group.GetFromItemID() == UUID.Zero)
599 { 594 {
600 m_log.DebugFormat("[SCENE GRAPH]: AttachObject 5 got {0}", group.UUID);
601 m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId); 595 m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId);
602 } 596 }
603 else 597 else
604 { 598 {
605 m_log.DebugFormat("[SCENE GRAPH]: AttachObject 6 got {0}", group.GetFromItemID());
606 itemId = group.GetFromItemID(); 599 itemId = group.GetFromItemID();
607 } 600 }
608 601
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index b0bb005..3f5d0dc 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3753,7 +3753,8 @@ namespace OpenSim.Region.Framework.Scenes
3753 } 3753 }
3754 3754
3755 /// <summary> 3755 /// <summary>
3756 /// RezAttachments. This should only be called upon login on the first region 3756 /// RezAttachments. This should only be called upon login on the first region.
3757 /// Attachment rezzings on crossings and TPs are done in a different way.
3757 /// </summary> 3758 /// </summary>
3758 public void RezAttachments() 3759 public void RezAttachments()
3759 { 3760 {
@@ -3784,45 +3785,14 @@ namespace OpenSim.Region.Framework.Scenes
3784 m_log.InfoFormat("[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {2} ({3})", 3785 m_log.InfoFormat("[ATTACHMENT]: Rezzed attachment in point {0} from item {1} and asset {2} ({3})",
3785 p, itemID, assetID, asset); 3786 p, itemID, assetID, asset);
3786 3787
3787 //SceneObjectPart att = m_scene.GetSceneObjectPart(asset);
3788 //m_log.DebugFormat("[ATTCHMENT]: Got scene object parent {0} IsAtt {1}",
3789 // ((att.ParentGroup != null) ? "not null" : "null"), att.IsAttachment);
3790 //if (att.ParentGroup != null && !att.IsAttachment)
3791 //{
3792 // att.FromItemID = itemID;
3793 // m_scene.AttachObject(ControllingClient, att.ParentGroup.LocalId, 0, Quaternion.Identity, att.ParentGroup.AbsolutePosition, false);
3794 //}
3795
3796 } 3788 }
3797 catch (Exception e) 3789 catch (Exception e)
3798 { 3790 {
3799 m_log.ErrorFormat("[ATTACHMENT] Unable to rez attachment: {0}", e.ToString()); 3791 m_log.ErrorFormat("[ATTACHMENT]: Unable to rez attachment: {0}", e.ToString());
3800 } 3792 }
3801 3793
3802 } 3794 }
3803 3795
3804 //SceneObjectPart att = m_scene.GetSceneObjectPart(asset);
3805
3806 //// If this is null, then the asset has not yet appeared in world
3807 //// so we revisit this when it does
3808 ////
3809 //if (att != null && att.UUID != asset) // Yes. It's really needed
3810 //{
3811 // m_log.DebugFormat("[ATTACHMENT]: Attach from in world: ItemID {0}, Asset ID {1}, Attachment inworld: {2}", itemID.ToString(), asset.ToString(), att.UUID.ToString());
3812
3813 // // This will throw if crossing katty-korner
3814 // // So catch it here to avoid the noid
3815 // //
3816 // try
3817 // {
3818 // // Attach from world, if not already attached
3819 // if (att.ParentGroup != null && !att.IsAttachment)
3820 // m_scene.AttachObject(ControllingClient, att.ParentGroup.LocalId, 0, Quaternion.Identity, att.ParentGroup.AbsolutePosition, false);
3821 // }
3822 // catch (NullReferenceException)
3823 // {
3824 // }
3825 //}
3826 } 3796 }
3827 } 3797 }
3828} 3798}