diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 7ebf002..fe75271 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -367,6 +367,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
367 | 367 | ||
368 | originalPositions[objectGroup.UUID] = objectGroup.AbsolutePosition; | 368 | originalPositions[objectGroup.UUID] = objectGroup.AbsolutePosition; |
369 | 369 | ||
370 | // Restore attachment data after trip through the sim | ||
371 | if (objectGroup.RootPart.AttachPoint > 0) | ||
372 | inventoryStoredPosition = objectGroup.RootPart.AttachOffset; | ||
373 | objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint; | ||
374 | |||
370 | objectGroup.AbsolutePosition = inventoryStoredPosition; | 375 | objectGroup.AbsolutePosition = inventoryStoredPosition; |
371 | 376 | ||
372 | // Make sure all bits but the ones we want are clear | 377 | // Make sure all bits but the ones we want are clear |
@@ -740,6 +745,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
740 | if (e == null || attachment) // Single | 745 | if (e == null || attachment) // Single |
741 | { | 746 | { |
742 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); | 747 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(xmlData); |
748 | if (!attachment) | ||
749 | { | ||
750 | g.RootPart.AttachPoint = g.RootPart.Shape.State; | ||
751 | g.RootPart.AttachOffset = g.AbsolutePosition; | ||
752 | } | ||
743 | 753 | ||
744 | objlist.Add(g); | 754 | objlist.Add(g); |
745 | veclist.Add(new Vector3(0, 0, 0)); | 755 | veclist.Add(new Vector3(0, 0, 0)); |
@@ -769,6 +779,8 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
769 | foreach (XmlNode n in groups) | 779 | foreach (XmlNode n in groups) |
770 | { | 780 | { |
771 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); | 781 | SceneObjectGroup g = SceneObjectSerializer.FromOriginalXmlFormat(n.OuterXml); |
782 | g.RootPart.AttachPoint = g.RootPart.Shape.State; | ||
783 | g.RootPart.AttachOffset = g.AbsolutePosition; | ||
772 | 784 | ||
773 | objlist.Add(g); | 785 | objlist.Add(g); |
774 | XmlElement el = (XmlElement)n; | 786 | XmlElement el = (XmlElement)n; |