diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs index 9d9c97b..22aadf4 100644 --- a/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs +++ b/OpenSim/Region/Environment/Scenes/AllNewSceneObjectGroup2.cs | |||
@@ -67,6 +67,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
67 | this.SetPartAsRoot(newPart); | 67 | this.SetPartAsRoot(newPart); |
68 | } | 68 | } |
69 | 69 | ||
70 | #region Copying | ||
70 | /// <summary> | 71 | /// <summary> |
71 | /// | 72 | /// |
72 | /// </summary> | 73 | /// </summary> |
@@ -75,8 +76,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
75 | { | 76 | { |
76 | AllNewSceneObjectGroup2 dupe = (AllNewSceneObjectGroup2) this.MemberwiseClone(); | 77 | AllNewSceneObjectGroup2 dupe = (AllNewSceneObjectGroup2) this.MemberwiseClone(); |
77 | dupe.Pos = new LLVector3(Pos.X, Pos.Y, Pos.Z); | 78 | dupe.Pos = new LLVector3(Pos.X, Pos.Y, Pos.Z); |
78 | dupe.CopyRootPart(this.m_rootPart); | 79 | dupe.m_scene = m_scene; |
80 | dupe.m_regionHandle = this.m_regionHandle; | ||
79 | 81 | ||
82 | dupe.CopyRootPart(this.m_rootPart); | ||
83 | |||
80 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 84 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) |
81 | { | 85 | { |
82 | if (part.UUID != this.m_rootPart.UUID) | 86 | if (part.UUID != this.m_rootPart.UUID) |
@@ -89,13 +93,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
89 | 93 | ||
90 | public void CopyRootPart(AllNewSceneObjectPart2 part) | 94 | public void CopyRootPart(AllNewSceneObjectPart2 part) |
91 | { | 95 | { |
92 | 96 | AllNewSceneObjectPart2 newPart = part.Copy(m_scene); | |
97 | this.m_parts.Add(newPart.UUID, newPart); | ||
98 | this.SetPartAsRoot(newPart); | ||
93 | } | 99 | } |
94 | 100 | ||
95 | public void CopyPart(AllNewSceneObjectPart2 part) | 101 | public void CopyPart(AllNewSceneObjectPart2 part) |
96 | { | 102 | { |
97 | 103 | AllNewSceneObjectPart2 newPart = part.Copy(m_scene); | |
104 | this.m_parts.Add(newPart.UUID, newPart); | ||
105 | newPart.ParentID = this.m_rootPart.LocalID; | ||
98 | } | 106 | } |
107 | #endregion | ||
99 | 108 | ||
100 | /// <summary> | 109 | /// <summary> |
101 | /// | 110 | /// |
@@ -133,7 +142,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
133 | /// <summary> | 142 | /// <summary> |
134 | /// | 143 | /// |
135 | /// </summary> | 144 | /// </summary> |
136 | public void ScheduleGroupFullUpdate() | 145 | public void SendGroupFullUpdate() |
137 | { | 146 | { |
138 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) | 147 | foreach (AllNewSceneObjectPart2 part in this.m_parts.Values) |
139 | { | 148 | { |