diff options
author | UbitUmarov | 2012-07-07 03:49:31 +0100 |
---|---|---|
committer | UbitUmarov | 2012-07-07 03:49:31 +0100 |
commit | d0f7fb1d3583b8c14568f38747800787cc4343d5 (patch) | |
tree | 4928f742b33aa45b044d9bada88fd4d906e6198b /OpenSim/Region/Framework/Scenes/SOPVehicle.cs | |
parent | ODE turn off material dependent friction while vehicle linear motor is Effect... (diff) | |
parent | Fix storing vehicle data (diff) | |
download | opensim-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.cs | 33 |
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; | |||
30 | using OpenMetaverse; | 30 | using OpenMetaverse; |
31 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
32 | using OpenSim.Region.Physics.Manager; | 32 | using OpenSim.Region.Physics.Manager; |
33 | using System.Text; | ||
34 | using System.IO; | ||
33 | using System.Xml; | 35 | using System.Xml; |
34 | using OpenSim.Framework.Serialization; | 36 | using OpenSim.Framework.Serialization; |
35 | using OpenSim.Framework.Serialization.External; | 37 | using 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 | } |