aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-11-10 21:06:26 +0000
committerJustin Clarke Casey2008-11-10 21:06:26 +0000
commit0bda2cf5bcc8204eb3487e287a33d7289544947e (patch)
tree7fa43aca9f50e258c5dc735a14151ff4a88d3e35 /OpenSim/Region
parentRestore the independent LocalID numbering for avatars. Fixes an issue where (diff)
downloadopensim-SC_OLD-0bda2cf5bcc8204eb3487e287a33d7289544947e.zip
opensim-SC_OLD-0bda2cf5bcc8204eb3487e287a33d7289544947e.tar.gz
opensim-SC_OLD-0bda2cf5bcc8204eb3487e287a33d7289544947e.tar.bz2
opensim-SC_OLD-0bda2cf5bcc8204eb3487e287a33d7289544947e.tar.xz
* refactor: clean up SOG xml2 reloading to reuse more code
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs15
-rw-r--r--OpenSim/Region/Environment/Scenes/SceneObjectPart.cs2
2 files changed, 4 insertions, 13 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 9afe8cd..f5c5838 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -454,11 +454,7 @@ namespace OpenSim.Region.Environment.Scenes
454 reader.Read(); 454 reader.Read();
455 455
456 reader.ReadStartElement("SceneObjectGroup"); 456 reader.ReadStartElement("SceneObjectGroup");
457 m_rootPart = SceneObjectPart.FromXml(reader); 457 SetRootPart(SceneObjectPart.FromXml(reader));
458 m_rootPart.SetParent(this);
459 m_parts.Add(m_rootPart.UUID, m_rootPart);
460 m_rootPart.ParentID = 0;
461 m_rootPart.LinkNum = 0;
462 458
463 reader.Read(); 459 reader.Read();
464 bool more = true; 460 bool more = true;
@@ -470,12 +466,9 @@ namespace OpenSim.Region.Environment.Scenes
470 case XmlNodeType.Element: 466 case XmlNodeType.Element:
471 if (reader.Name == "SceneObjectPart") 467 if (reader.Name == "SceneObjectPart")
472 { 468 {
473 SceneObjectPart Part = SceneObjectPart.FromXml(reader); 469 SceneObjectPart part = SceneObjectPart.FromXml(reader);
474 if (m_rootPart.LinkNum == 0) 470 AddPart(part);
475 m_rootPart.LinkNum++; 471 part.StoreUndoState();
476 AddPart(Part);
477 Part.LinkNum = m_parts.Count;
478 Part.StoreUndoState();
479 } 472 }
480 else 473 else
481 { 474 {
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 4d54634..05b23aa 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -2414,8 +2414,6 @@ if (m_shape != null) {
2414 } 2414 }
2415 } 2415 }
2416 2416
2417
2418
2419 if (m_parentGroup.GetSceneMaxUndo() > 0) 2417 if (m_parentGroup.GetSceneMaxUndo() > 0)
2420 { 2418 {
2421 UndoState nUndo = new UndoState(this); 2419 UndoState nUndo = new UndoState(this);