aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes')
-rw-r--r--OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs36
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs36
2 files changed, 29 insertions, 43 deletions
diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
index df9473d..5b571c7 100644
--- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
+++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs
@@ -122,13 +122,12 @@ namespace OpenSim.Region.Framework.Scenes
122 public bool InventoryDeQueueAndDelete() 122 public bool InventoryDeQueueAndDelete()
123 { 123 {
124 DeleteToInventoryHolder x = null; 124 DeleteToInventoryHolder x = null;
125 int left = 0;
126 125
127 try 126 try
128 { 127 {
129 lock (m_inventoryDeletes) 128 lock (m_inventoryDeletes)
130 { 129 {
131 left = m_inventoryDeletes.Count; 130 int left = m_inventoryDeletes.Count;
132 if (left > 0) 131 if (left > 0)
133 { 132 {
134 x = m_inventoryDeletes.Dequeue(); 133 x = m_inventoryDeletes.Dequeue();
@@ -137,26 +136,23 @@ namespace OpenSim.Region.Framework.Scenes
137 m_inventoryDeletes.Enqueue(x); 136 m_inventoryDeletes.Enqueue(x);
138 return true; 137 return true;
139 } 138 }
140 }
141 }
142 139
143 if (left > 0) 140 m_log.DebugFormat(
144 { 141 "[SCENE]: Sending object to user's inventory, {0} item(s) remaining.", left);
145 m_log.DebugFormat( 142
146 "[SCENE]: Sending object to user's inventory, {0} item(s) remaining.", left); 143 try
147 144 {
148 try 145 m_scene.DeleteToInventory(x.action, x.folderID, x.objectGroup, x.remoteClient);
149 { 146 if (x.permissionToDelete)
150 m_scene.DeleteToInventory(x.action, x.folderID, x.objectGroup, x.remoteClient); 147 m_scene.DeleteSceneObject(x.objectGroup, false);
151 if (x.permissionToDelete) 148 }
152 m_scene.DeleteSceneObject(x.objectGroup, false); 149 catch (Exception e)
153 } 150 {
154 catch (Exception e) 151 m_log.DebugFormat("Exception background sending object: " + e);
155 { 152 }
156 m_log.DebugFormat("Exception background sending object: " + e); 153
154 return true;
157 } 155 }
158
159 return true;
160 } 156 }
161 } 157 }
162 catch (Exception e) 158 catch (Exception e)
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 20b3b5c..54ac792 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -297,44 +297,34 @@ namespace OpenSim.Region.Framework.Scenes
297 297
298 sceneObject.AttachToScene(m_parentScene); 298 sceneObject.AttachToScene(m_parentScene);
299 299
300 List<SceneObjectPart> parts = null;
301 bool found = false;
302 lock (sceneObject) 300 lock (sceneObject)
303 { 301 {
304 if (!Entities.ContainsKey(sceneObject.UUID)) 302 if (!Entities.ContainsKey(sceneObject.UUID))
305 { 303 {
306 found = true;
307 Entities.Add(sceneObject); 304 Entities.Add(sceneObject);
308 m_numPrim += sceneObject.Children.Count; 305 m_numPrim += sceneObject.Children.Count;
309 306
310 if (attachToBackup) 307 if (attachToBackup)
311 sceneObject.AttachToBackup(); 308 sceneObject.AttachToBackup();
312 309
313 parts = new List<SceneObjectPart>(sceneObject.Children.Values); 310 if (OnObjectCreate != null)
314 311 OnObjectCreate(sceneObject);
315 } 312
316 } 313 lock (m_dictionary_lock)
317
318 if (found)
319 {
320 lock (m_dictionary_lock)
321 {
322 SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject;
323 SceneObjectGroupsByLocalID[sceneObject.LocalId] = sceneObject;
324 foreach (SceneObjectPart part in parts)
325 { 314 {
326 SceneObjectGroupsByFullID[part.UUID] = sceneObject; 315 SceneObjectGroupsByFullID[sceneObject.UUID] = sceneObject;
327 SceneObjectGroupsByLocalID[part.LocalId] = sceneObject; 316 SceneObjectGroupsByLocalID[sceneObject.LocalId] = sceneObject;
317 foreach (SceneObjectPart part in sceneObject.Children.Values)
318 {
319 SceneObjectGroupsByFullID[part.UUID] = sceneObject;
320 SceneObjectGroupsByLocalID[part.LocalId] = sceneObject;
321 }
328 } 322 }
329 }
330 323
331 if (OnObjectCreate != null) 324 return true;
332 OnObjectCreate(sceneObject); 325 }
333
334 return true;
335 } 326 }
336 327
337
338 return false; 328 return false;
339 } 329 }
340 330