aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-07 18:52:28 +0000
committerJustin Clarke Casey2008-11-07 18:52:28 +0000
commitcd96a339760ca1bd85c012d73cf92cee366a6b9e (patch)
tree7c2a3b3b4ecba3c8e057d65784c4fd6c587e14d9 /OpenSim
parent* refactor: allocate local ids to prims only when an object is attached to a ... (diff)
downloadopensim-SC_OLD-cd96a339760ca1bd85c012d73cf92cee366a6b9e.zip
opensim-SC_OLD-cd96a339760ca1bd85c012d73cf92cee366a6b9e.tar.gz
opensim-SC_OLD-cd96a339760ca1bd85c012d73cf92cee366a6b9e.tar.bz2
opensim-SC_OLD-cd96a339760ca1bd85c012d73cf92cee366a6b9e.tar.xz
* Stop now unnecessary separate local id allocation for restored objects
* remove a debug line I accidentally left in there
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Environment/Scenes/InnerScene.cs7
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs4
2 files changed, 2 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs
index 6c0f57b..2f7ca21 100644
--- a/OpenSim/Region/Environment/Scenes/InnerScene.cs
+++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs
@@ -197,13 +197,6 @@ namespace OpenSim.Region.Environment.Scenes
197 protected internal bool AddRestoredSceneObject( 197 protected internal bool AddRestoredSceneObject(
198 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted) 198 SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted)
199 { 199 {
200 foreach (SceneObjectPart part in sceneObject.Children.Values)
201 {
202 part.LocalId = m_parentScene.PrimIDAllocate();
203 }
204
205 sceneObject.UpdateParentIDs();
206
207 if (!alreadyPersisted) 200 if (!alreadyPersisted)
208 { 201 {
209 sceneObject.ForceInventoryPersistence(); 202 sceneObject.ForceInventoryPersistence();
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 5926445..2c559a3 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -578,7 +578,7 @@ namespace OpenSim.Region.Environment.Scenes
578 578
579 //UpdateParentIDs(); 579 //UpdateParentIDs();
580 580
581 // No need to lock here since part isn't yet in a scene 581 // No need to lock here since the object isn't yet in a scene
582 foreach (SceneObjectPart part in m_parts.Values) 582 foreach (SceneObjectPart part in m_parts.Values)
583 { 583 {
584 if (Object.ReferenceEquals(part, m_rootPart)) 584 if (Object.ReferenceEquals(part, m_rootPart))
@@ -586,7 +586,7 @@ namespace OpenSim.Region.Environment.Scenes
586 586
587 part.LocalId = m_scene.PrimIDAllocate(); 587 part.LocalId = m_scene.PrimIDAllocate();
588 part.ParentID = m_rootPart.LocalId; 588 part.ParentID = m_rootPart.LocalId;
589 m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID); 589 //m_log.DebugFormat("[SCENE]: Given local id {0} to part {1}, linknum {2}, parent {3} {4}", part.LocalId, part.UUID, part.LinkNum, part.ParentID, part.ParentUUID);
590 } 590 }
591 591
592 ApplyPhysics(m_scene.m_physicalPrim); 592 ApplyPhysics(m_scene.m_physicalPrim);