aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs')
-rw-r--r--OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs45
1 files changed, 18 insertions, 27 deletions
diff --git a/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs
index d7838c5..c7b1ed7 100644
--- a/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs
+++ b/OpenSim/Region/OptionalModules/ContentManagementSystem/MetaEntity.cs
@@ -98,10 +98,9 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
98 98
99 #region Public Properties 99 #region Public Properties
100 100
101 public Dictionary<UUID, SceneObjectPart> Children 101 public SceneObjectPart[] Parts
102 { 102 {
103 get { return m_Entity.Children; } 103 get { return m_Entity.Parts; }
104 set { m_Entity.Children = value; }
105 } 104 }
106 105
107 public uint LocalId 106 public uint LocalId
@@ -150,19 +149,17 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
150 { 149 {
151 //make new uuids 150 //make new uuids
152 Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>(); 151 Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>();
153 152
154 lock (m_Entity.Children) 153 foreach (SceneObjectPart part in m_Entity.Parts)
155 { 154 {
156 foreach (SceneObjectPart part in m_Entity.Children.Values) 155 part.ResetIDs(part.LinkNum);
157 { 156 parts.Add(part.UUID, part);
158 part.ResetIDs(part.LinkNum);
159 parts.Add(part.UUID, part);
160 }
161
162 //finalize
163 m_Entity.RootPart.PhysActor = null;
164 m_Entity.Children = parts;
165 } 157 }
158
159 //finalize
160 m_Entity.RootPart.PhysActor = null;
161 foreach (SceneObjectPart part in parts.Values)
162 m_Entity.AddPart(part);
166 } 163 }
167 164
168 #endregion Protected Methods 165 #endregion Protected Methods
@@ -177,11 +174,8 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
177 //This deletes the group without removing from any databases. 174 //This deletes the group without removing from any databases.
178 //This is important because we are not IN any database. 175 //This is important because we are not IN any database.
179 //m_Entity.FakeDeleteGroup(); 176 //m_Entity.FakeDeleteGroup();
180 lock (m_Entity.Children) 177 foreach (SceneObjectPart part in m_Entity.Parts)
181 { 178 client.SendKillObject(m_Entity.RegionHandle, part.LocalId);
182 foreach (SceneObjectPart part in m_Entity.Children.Values)
183 client.SendKillObject(m_Entity.RegionHandle, part.LocalId);
184 }
185 } 179 }
186 180
187 /// <summary> 181 /// <summary>
@@ -189,15 +183,12 @@ namespace OpenSim.Region.OptionalModules.ContentManagement
189 /// </summary> 183 /// </summary>
190 public virtual void HideFromAll() 184 public virtual void HideFromAll()
191 { 185 {
192 lock (m_Entity.Children) 186 foreach (SceneObjectPart part in m_Entity.Parts)
193 { 187 {
194 foreach (SceneObjectPart part in m_Entity.Children.Values) 188 m_Entity.Scene.ForEachClient(
195 { 189 delegate(IClientAPI controller)
196 m_Entity.Scene.ForEachClient( 190 { controller.SendKillObject(m_Entity.RegionHandle, part.LocalId); }
197 delegate(IClientAPI controller) 191 );
198 { controller.SendKillObject(m_Entity.RegionHandle, part.LocalId); }
199 );
200 }
201 } 192 }
202 } 193 }
203 194