aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index e5c6bf1..d72ed7d 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -1477,8 +1477,26 @@ namespace OpenSim.Region.Framework.Scenes
1477 SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone(); 1477 SceneObjectGroup dupe = (SceneObjectGroup)MemberwiseClone();
1478 dupe.m_isBackedUp = false; 1478 dupe.m_isBackedUp = false;
1479 dupe.m_parts = new Dictionary<UUID, SceneObjectPart>(); 1479 dupe.m_parts = new Dictionary<UUID, SceneObjectPart>();
1480
1481 // Warning, The following code related to previousAttachmentStatus is needed so that clones of
1482 // attachments do not bordercross while they're being duplicated. This is hacktastic!
1483 // Normally, setting AbsolutePosition will bordercross a prim if it's outside the region!
1484 // unless IsAttachment is true!, so to prevent border crossing, we save it's attachment state
1485 // (which should be false anyway) set it as an Attachment and then set it's Absolute Position,
1486 // then restore it's attachment state
1487
1488 // This is only necessary when userExposed is false!
1489
1490 bool previousAttachmentStatus = dupe.RootPart.IsAttachment;
1491
1492 if (!userExposed)
1493 dupe.RootPart.IsAttachment = true;
1494
1480 dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z); 1495 dupe.AbsolutePosition = new Vector3(AbsolutePosition.X, AbsolutePosition.Y, AbsolutePosition.Z);
1481 1496
1497 if (!userExposed)
1498 dupe.RootPart.IsAttachment = previousAttachmentStatus;
1499
1482 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed); 1500 dupe.CopyRootPart(m_rootPart, OwnerID, GroupID, userExposed);
1483 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum; 1501 dupe.m_rootPart.LinkNum = m_rootPart.LinkNum;
1484 1502