From 33a894f3d2cc95a7a512b86f39f3c6a6afabb015 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 27 Aug 2011 00:15:21 +0100 Subject: refactor: move SOP.IsAttachment and AttachmentPoint up into SOG to avoid pointless duplication of identical values --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index fc89473..93782ce 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -3178,7 +3178,7 @@ namespace OpenSim.Region.Framework.Scenes ISceneObject clone = sog.CloneForNewScene(); // Attachment module assumes that GroupPosition holds the offsets...! ((SceneObjectGroup)clone).RootPart.GroupPosition = sog.RootPart.AttachedPos; - ((SceneObjectGroup)clone).RootPart.IsAttachment = false; + ((SceneObjectGroup)clone).IsAttachment = false; cAgent.AttachmentObjects.Add(clone); string state = sog.GetStateSnapshot(); cAgent.AttachmentObjectStates.Add(state); @@ -3477,7 +3477,7 @@ namespace OpenSim.Region.Framework.Scenes { foreach (SceneObjectGroup so in m_attachments) { - if (attachmentPoint == so.RootPart.AttachmentPoint) + if (attachmentPoint == so.AttachmentPoint) attachments.Add(so); } } @@ -3869,12 +3869,12 @@ namespace OpenSim.Region.Framework.Scenes { if (grp.HasGroupChanged) // Resizer scripts? { - grp.RootPart.IsAttachment = false; + grp.IsAttachment = false; grp.AbsolutePosition = grp.RootPart.AttachedPos; // grp.DetachToInventoryPrep(); attachmentsModule.UpdateKnownItem(ControllingClient, grp, grp.GetFromItemID(), grp.OwnerID); - grp.RootPart.IsAttachment = true; + grp.IsAttachment = true; } } } -- cgit v1.1