From e62b3dba8a1b8c816d6b09dc1f14b915f1560afe Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 14 Dec 2010 00:11:41 +0000 Subject: reinstate IAttachmentsModule.UpdateAttachmentPosition() since this is being used by a 3rd party region module and contains non-obvious attachment specific code There are no functional changes. UpdateAttachmentPosition() is adapted to the new approach of only saving attachment state on logout --- OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 15 +++++++++------ OpenSim/Region/Framework/Scenes/SceneGraph.cs | 9 ++------- 2 files changed, 11 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index b3576c5..6cc64c6 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs @@ -113,15 +113,18 @@ namespace OpenSim.Region.Framework.Interfaces /// /// Update the user inventory to show a detach. /// - /// - /// A - /// - /// - /// A - /// + /// /param> + /// void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient); /// + /// Update the position of an attachment. + /// + /// + /// + void UpdateAttachmentPosition(SceneObjectGroup sog, Vector3 pos); + + /// /// Update the user inventory with a changed attachment /// /// diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 78e5da3..a2ed54f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1281,13 +1281,8 @@ namespace OpenSim.Region.Framework.Scenes { if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) { - // Set the new attachment point data in the object - byte attachmentPoint = group.GetAttachmentPoint(); - group.UpdateGroupPosition(pos); - group.RootPart.IsAttachment = false; - group.AbsolutePosition = group.RootPart.AttachedPos; - group.SetAttachmentPoint(attachmentPoint); - group.HasGroupChanged = true; + if (m_parentScene.AttachmentsModule != null) + m_parentScene.AttachmentsModule.UpdateAttachmentPosition(group, pos); } else { -- cgit v1.1