diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | 8 |
2 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 1a7da61..1bf3a66 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -219,6 +219,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
219 | 219 | ||
220 | Vector3 originalPosition = objectGroup.AbsolutePosition; | 220 | Vector3 originalPosition = objectGroup.AbsolutePosition; |
221 | 221 | ||
222 | // Restore attachment data after trip through the sim | ||
223 | if (objectGroup.RootPart.AttachPoint > 0) | ||
224 | inventoryStoredPosition = objectGroup.RootPart.AttachOffset; | ||
225 | objectGroup.RootPart.Shape.State = objectGroup.RootPart.AttachPoint; | ||
226 | |||
222 | objectGroup.AbsolutePosition = inventoryStoredPosition; | 227 | objectGroup.AbsolutePosition = inventoryStoredPosition; |
223 | 228 | ||
224 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(objectGroup); | 229 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(objectGroup); |
@@ -516,6 +521,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
516 | string xmlData = Utils.BytesToString(rezAsset.Data); | 521 | string xmlData = Utils.BytesToString(rezAsset.Data); |
517 | SceneObjectGroup group | 522 | SceneObjectGroup group |
518 | = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); | 523 | = SceneObjectSerializer.FromOriginalXmlFormat(itemId, xmlData); |
524 | Vector3 storedPosition = group.AbsolutePosition; | ||
519 | 525 | ||
520 | group.RootPart.FromFolderID = item.Folder; | 526 | group.RootPart.FromFolderID = item.Folder; |
521 | 527 | ||
@@ -635,6 +641,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
635 | { | 641 | { |
636 | if (group.RootPart.Shape.PCode == (byte)PCode.Prim) | 642 | if (group.RootPart.Shape.PCode == (byte)PCode.Prim) |
637 | { | 643 | { |
644 | // Save attachment data | ||
645 | group.RootPart.AttachPoint = group.RootPart.Shape.State; | ||
646 | group.RootPart.AttachOffset = storedPosition; | ||
647 | |||
638 | group.ClearPartAttachmentData(); | 648 | group.ClearPartAttachmentData(); |
639 | } | 649 | } |
640 | 650 | ||
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index f8ae321..87b2d74 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -182,6 +182,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
182 | [XmlIgnore] | 182 | [XmlIgnore] |
183 | public UUID FromFolderID; | 183 | public UUID FromFolderID; |
184 | 184 | ||
185 | // The following two are to hold the attachment data | ||
186 | // while an object is inworld | ||
187 | [XmlIgnore] | ||
188 | public byte AttachPoint = 0; | ||
189 | |||
190 | [XmlIgnore] | ||
191 | public Vector3 AttachOffset = Vector3.Zero; | ||
192 | |||
185 | [XmlIgnore] | 193 | [XmlIgnore] |
186 | public int STATUS_ROTATE_X; | 194 | public int STATUS_ROTATE_X; |
187 | 195 | ||