diff options
author | Melanie | 2009-10-07 01:44:36 +0100 |
---|---|---|
committer | Melanie | 2009-10-07 01:44:36 +0100 |
commit | 9618c196c274fefda4437eff6d25c7a12e7a3ee1 (patch) | |
tree | b860a6f957e3d0b2504ca2ec6802b1a211e4a3de /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Commented noisy debugging about packet splitting (diff) | |
download | opensim-SC_OLD-9618c196c274fefda4437eff6d25c7a12e7a3ee1.zip opensim-SC_OLD-9618c196c274fefda4437eff6d25c7a12e7a3ee1.tar.gz opensim-SC_OLD-9618c196c274fefda4437eff6d25c7a12e7a3ee1.tar.bz2 opensim-SC_OLD-9618c196c274fefda4437eff6d25c7a12e7a3ee1.tar.xz |
Revert "Merging in diva's locking fixes"
This reverts commit 832cc685138b2244529f10b54b373c34adb4a633.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 36 |
1 files changed, 13 insertions, 23 deletions
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 | ||