aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs50
1 files changed, 1 insertions, 49 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index b0de405..cceb444 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -655,50 +655,6 @@ namespace OpenSim.Region.Framework.Scenes
655 655
656 #endregion 656 #endregion
657 657
658 public string ToXmlString()
659 {
660 using (StringWriter sw = new StringWriter())
661 {
662 using (XmlTextWriter writer = new XmlTextWriter(sw))
663 {
664 ToXml(writer);
665 }
666
667 return sw.ToString();
668 }
669 }
670
671 public void ToXml(XmlTextWriter writer)
672 {
673 //m_log.DebugFormat("[SOG]: Starting serialization of {0}", Name);
674 //int time = System.Environment.TickCount;
675
676 writer.WriteStartElement(String.Empty, "SceneObjectGroup", String.Empty);
677 writer.WriteStartElement(String.Empty, "RootPart", String.Empty);
678 m_rootPart.ToXml(writer);
679 writer.WriteEndElement();
680 writer.WriteStartElement(String.Empty, "OtherParts", String.Empty);
681
682 lock (m_parts)
683 {
684 foreach (SceneObjectPart part in m_parts.Values)
685 {
686 if (part.UUID != m_rootPart.UUID)
687 {
688 writer.WriteStartElement(String.Empty, "Part", String.Empty);
689 part.ToXml(writer);
690 writer.WriteEndElement();
691 }
692 }
693 }
694
695 writer.WriteEndElement(); // OtherParts
696 SaveScriptedState(writer);
697 writer.WriteEndElement(); // SceneObjectGroup
698
699 //m_log.DebugFormat("[SOG]: Finished serialization of SOG {0}, {1}ms", Name, System.Environment.TickCount - time);
700 }
701
702 public string ToXmlString2() 658 public string ToXmlString2()
703 { 659 {
704 using (StringWriter sw = new StringWriter()) 660 using (StringWriter sw = new StringWriter())
@@ -714,7 +670,6 @@ namespace OpenSim.Region.Framework.Scenes
714 670
715 public void ToXml2(XmlTextWriter writer) 671 public void ToXml2(XmlTextWriter writer)
716 { 672 {
717
718 //m_log.DebugFormat("[SOG]: Starting serialization of SOG {0} to XML2", Name); 673 //m_log.DebugFormat("[SOG]: Starting serialization of SOG {0} to XML2", Name);
719 //int time = System.Environment.TickCount; 674 //int time = System.Environment.TickCount;
720 675
@@ -738,12 +693,10 @@ namespace OpenSim.Region.Framework.Scenes
738 writer.WriteEndElement(); // End of SceneObjectGroup 693 writer.WriteEndElement(); // End of SceneObjectGroup
739 694
740 //m_log.DebugFormat("[SOG]: Finished serialization of SOG {0} to XML2, {1}ms", Name, System.Environment.TickCount - time); 695 //m_log.DebugFormat("[SOG]: Finished serialization of SOG {0} to XML2, {1}ms", Name, System.Environment.TickCount - time);
741
742 } 696 }
743 697
744 private void SaveScriptedState(XmlTextWriter writer) 698 public void SaveScriptedState(XmlTextWriter writer)
745 { 699 {
746
747 XmlDocument doc = new XmlDocument(); 700 XmlDocument doc = new XmlDocument();
748 Dictionary<UUID,string> states = new Dictionary<UUID,string>(); 701 Dictionary<UUID,string> states = new Dictionary<UUID,string>();
749 702
@@ -774,7 +727,6 @@ namespace OpenSim.Region.Framework.Scenes
774 } 727 }
775 writer.WriteEndElement(); // End of GroupScriptStates 728 writer.WriteEndElement(); // End of GroupScriptStates
776 } 729 }
777
778 } 730 }
779 731
780 /// <summary> 732 /// <summary>