From 7aa54593e0b6672979feec97b8151ed134388723 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 12 Aug 2009 20:39:48 -0700 Subject: Redirected all calls to CachedUserProfile methods to the inventory service. Redirection of the RootFolder property is still todo. This compiles but probably inventory will be inconsistent. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (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 0e0999a..9599379 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -542,7 +542,7 @@ namespace OpenSim.Region.Framework.Scenes group.DetachToInventoryPrep(); m_log.Debug("[DETACH]: Saving attachpoint: " + ((uint)group.GetAttachmentPoint()).ToString()); - m_parentScene.updateKnownAsset(remoteClient, group, + m_parentScene.UpdateKnownItem(remoteClient, group, group.GetFromAssetID(), group.OwnerID); m_parentScene.DeleteSceneObject(group, false); return; @@ -1307,7 +1307,7 @@ namespace OpenSim.Region.Framework.Scenes group.UpdateGroupPosition(pos); group.RootPart.IsAttachment = false; group.AbsolutePosition = group.RootPart.AttachedPos; - m_parentScene.updateKnownAsset(remoteClient, group, group.GetFromAssetID(), group.OwnerID); + m_parentScene.UpdateKnownItem(remoteClient, group, group.GetFromAssetID(), group.OwnerID); group.SetAttachmentPoint(attachmentPoint); } -- cgit v1.1 From 1bbf06405c109a4299a9494555f8223dd954610b Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 15 Aug 2009 09:36:45 -0700 Subject: Changed FromAssetID to FromItemID --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (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 9599379..7b6b666 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -442,7 +442,7 @@ namespace OpenSim.Region.Framework.Scenes if (group != null) { //group.DetachToGround(); - m_parentScene.DetachSingleAttachmentToInv(group.GetFromAssetID(), remoteClient); + m_parentScene.DetachSingleAttachmentToInv(group.GetFromItemID(), remoteClient); } } @@ -489,7 +489,7 @@ namespace OpenSim.Region.Framework.Scenes // Calls attach with a Zero position // AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero, false); - m_parentScene.SendAttachEvent(objectLocalID, part.ParentGroup.GetFromAssetID(), remoteClient.AgentId); + m_parentScene.SendAttachEvent(objectLocalID, part.ParentGroup.GetFromItemID(), remoteClient.AgentId); } public SceneObjectGroup RezSingleAttachment( @@ -536,14 +536,14 @@ namespace OpenSim.Region.Framework.Scenes if (entity is SceneObjectGroup) { group = (SceneObjectGroup)entity; - if (group.GetFromAssetID() == itemID) + if (group.GetFromItemID() == itemID) { m_parentScene.SendAttachEvent(group.LocalId, itemID, UUID.Zero); group.DetachToInventoryPrep(); m_log.Debug("[DETACH]: Saving attachpoint: " + ((uint)group.GetAttachmentPoint()).ToString()); m_parentScene.UpdateKnownItem(remoteClient, group, - group.GetFromAssetID(), group.OwnerID); + group.GetFromItemID(), group.OwnerID); m_parentScene.DeleteSceneObject(group, false); return; } @@ -588,13 +588,13 @@ namespace OpenSim.Region.Framework.Scenes // Saves and gets assetID UUID itemId; - if (group.GetFromAssetID() == UUID.Zero) + if (group.GetFromItemID() == UUID.Zero) { m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId, out itemId); } else { - itemId = group.GetFromAssetID(); + itemId = group.GetFromItemID(); } m_parentScene.AttachObject(remoteClient, AttachmentPt, itemId, group); @@ -1307,7 +1307,7 @@ namespace OpenSim.Region.Framework.Scenes group.UpdateGroupPosition(pos); group.RootPart.IsAttachment = false; group.AbsolutePosition = group.RootPart.AttachedPos; - m_parentScene.UpdateKnownItem(remoteClient, group, group.GetFromAssetID(), group.OwnerID); + m_parentScene.UpdateKnownItem(remoteClient, group, group.GetFromItemID(), group.OwnerID); group.SetAttachmentPoint(attachmentPoint); } -- cgit v1.1 From 19e45466f2ce804694b4a0b8fcbf2d30d27f5821 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 15 Aug 2009 14:57:24 -0700 Subject: Changed one word in a comment --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 2 +- 1 file changed, 1 insertion(+), 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 7b6b666..7a45e3b 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -585,7 +585,7 @@ namespace OpenSim.Region.Framework.Scenes group.SetAttachmentPoint(Convert.ToByte(AttachmentPt)); group.AbsolutePosition = attachPos; - // Saves and gets assetID + // Saves and gets itemID UUID itemId; if (group.GetFromItemID() == UUID.Zero) -- cgit v1.1 From 9d9fcac0386ba6adc7a1f6c08f82bd5c0b6cd1d2 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Fri, 14 Aug 2009 17:16:41 +0900 Subject: Misc cleanup. --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (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 0e0999a..7771831 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -928,25 +928,22 @@ namespace OpenSim.Region.Framework.Scenes { // Primitive Ray Tracing float closestDistance = 280f; - EntityIntersection returnResult = new EntityIntersection(); + EntityIntersection result = new EntityIntersection(); List EntityList = GetEntities(); foreach (EntityBase ent in EntityList) { if (ent is SceneObjectGroup) { SceneObjectGroup reportingG = (SceneObjectGroup)ent; - EntityIntersection result = reportingG.TestIntersection(hray, frontFacesOnly, faceCenters); - if (result.HitTF) + EntityIntersection inter = reportingG.TestIntersection(hray, frontFacesOnly, faceCenters); + if (inter.HitTF && inter.distance < closestDistance) { - if (result.distance < closestDistance) - { - closestDistance = result.distance; - returnResult = result; - } + closestDistance = inter.distance; + result = inter; } } } - return returnResult; + return result; } /// @@ -979,7 +976,7 @@ namespace OpenSim.Region.Framework.Scenes { foreach (SceneObjectPart p in ((SceneObjectGroup) ent).GetParts()) { - if (p.Name==name) + if (p.Name == name) { return p; } -- cgit v1.1 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 From 5d47e08dada2b4de1170b9adb4cca5cd51593cc9 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 16 Aug 2009 17:11:20 -0700 Subject: Removed some debug messages --- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 7 ------- 1 file changed, 7 deletions(-) (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 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 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 @@ -565,7 +564,6 @@ 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; } @@ -574,7 +572,6 @@ 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....... @@ -583,11 +580,9 @@ 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; @@ -597,12 +592,10 @@ 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(); } -- cgit v1.1