aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectPart.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index db4e285..c06175e 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -1753,7 +1753,11 @@ namespace OpenSim.Region.Framework.Scenes
1753 /// <returns></returns> 1753 /// <returns></returns>
1754 public SceneObjectPart Copy(uint localID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed) 1754 public SceneObjectPart Copy(uint localID, UUID AgentID, UUID GroupID, int linkNum, bool userExposed)
1755 { 1755 {
1756 // FIXME: This is dangerous since it's easy to forget to reset some references when necessary and end up
1757 // with bugs that only occur in some circumstances (e.g. crossing between regions on the same simulator
1758 // but not between regions on different simulators). Really, all copying should be done explicitly.
1756 SceneObjectPart dupe = (SceneObjectPart)MemberwiseClone(); 1759 SceneObjectPart dupe = (SceneObjectPart)MemberwiseClone();
1760
1757 dupe.m_shape = m_shape.Copy(); 1761 dupe.m_shape = m_shape.Copy();
1758 dupe.m_regionHandle = m_regionHandle; 1762 dupe.m_regionHandle = m_regionHandle;
1759 if (userExposed) 1763 if (userExposed)
@@ -1799,6 +1803,8 @@ namespace OpenSim.Region.Framework.Scenes
1799 Array.Copy(Shape.ExtraParams, extraP, extraP.Length); 1803 Array.Copy(Shape.ExtraParams, extraP, extraP.Length);
1800 dupe.Shape.ExtraParams = extraP; 1804 dupe.Shape.ExtraParams = extraP;
1801 1805
1806 dupe.m_sittingAvatars = new HashSet<OpenMetaverse.UUID>();
1807
1802 // safeguard actual copy is done in sog.copy 1808 // safeguard actual copy is done in sog.copy
1803 dupe.KeyframeMotion = null; 1809 dupe.KeyframeMotion = null;
1804 dupe.PayPrice = (int[])PayPrice.Clone(); 1810 dupe.PayPrice = (int[])PayPrice.Clone();