aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-07-07 03:49:31 +0100
committerUbitUmarov2012-07-07 03:49:31 +0100
commitd0f7fb1d3583b8c14568f38747800787cc4343d5 (patch)
tree4928f742b33aa45b044d9bada88fd4d906e6198b /OpenSim/Region/Framework/Scenes/SOPVehicle.cs
parentODE turn off material dependent friction while vehicle linear motor is Effect... (diff)
parentFix storing vehicle data (diff)
downloadopensim-SC-d0f7fb1d3583b8c14568f38747800787cc4343d5.zip
opensim-SC-d0f7fb1d3583b8c14568f38747800787cc4343d5.tar.gz
opensim-SC-d0f7fb1d3583b8c14568f38747800787cc4343d5.tar.bz2
opensim-SC-d0f7fb1d3583b8c14568f38747800787cc4343d5.tar.xz
Merge branch 'avination' into ubitwork
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SOPVehicle.cs33
1 files changed, 32 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
index d3c2d27..45ca00c 100644
--- a/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
+++ b/OpenSim/Region/Framework/Scenes/SOPVehicle.cs
@@ -30,6 +30,8 @@ using System.Collections.Generic;
30using OpenMetaverse; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Physics.Manager; 32using OpenSim.Region.Physics.Manager;
33using System.Text;
34using System.IO;
33using System.Xml; 35using System.Xml;
34using OpenSim.Framework.Serialization; 36using OpenSim.Framework.Serialization;
35using OpenSim.Framework.Serialization.External; 37using OpenSim.Framework.Serialization.External;
@@ -561,6 +563,35 @@ namespace OpenSim.Region.Framework.Scenes
561 } 563 }
562 564
563 565
566 public string ToXml2()
567 {
568 MemoryStream ms = new MemoryStream();
569 UTF8Encoding enc = new UTF8Encoding();
570 XmlTextWriter writer = new XmlTextWriter(ms, null);
571 ToXml2(writer);
572 return enc.GetString(ms.ToArray());
573 }
574
575 public static SOPVehicle FromXml2(string text)
576 {
577 if (text == String.Empty)
578 return null;
579 UTF8Encoding enc = new UTF8Encoding();
580 MemoryStream ms = new MemoryStream(enc.GetBytes(text));
581 XmlTextReader reader = new XmlTextReader(ms);
582
583 SOPVehicle v = new SOPVehicle();
584 bool error;
585
586 v.FromXml2(reader, out error);
587 if (error)
588 {
589 v = null;
590 return null;
591 }
592
593 return v;
594 }
564 595
565 public void FromXml2(XmlTextReader _reader, out bool errors) 596 public void FromXml2(XmlTextReader _reader, out bool errors)
566 { 597 {
@@ -739,4 +770,4 @@ namespace OpenSim.Region.Framework.Scenes
739 vd.m_referenceFrame = XRquat(); 770 vd.m_referenceFrame = XRquat();
740 } 771 }
741 } 772 }
742} \ No newline at end of file 773}