diff options
author | Justin Clark-Casey (justincc) | 2012-05-12 02:36:56 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-12 02:36:56 +0100 |
commit | 8b958e7e74d8e4b462c6a59c2854c5072ff8c746 (patch) | |
tree | 391e872861713771078d6706fe49b16b94ece9ff /OpenSim/Framework/RegionSettings.cs | |
parent | Save the Telehub and its Spawn Points in the OAR (diff) | |
download | opensim-SC-8b958e7e74d8e4b462c6a59c2854c5072ff8c746.zip opensim-SC-8b958e7e74d8e4b462c6a59c2854c5072ff8c746.tar.gz opensim-SC-8b958e7e74d8e4b462c6a59c2854c5072ff8c746.tar.bz2 opensim-SC-8b958e7e74d8e4b462c6a59c2854c5072ff8c746.tar.xz |
Revert "Save the Telehub and its Spawn Points in the OAR"
This reverts commit b0b7b45b943dd94546bcfcf5d3bb871cfe35b507.
Sorry BlueWall, I wanted to discuss an aspect of the data storage but I couldn't assign bugs in 'patch included' state to myself until I changed mantis just now and I forgot to mention it on irc.
I wouldn't normally revert but thinks get tricky when it comes to data formats.
Essentially, I would like to see the Yaw, Pitch and Distance values as separate XML entities (as used in other aspects such as vectors, quaternions) rather than as a . delimited string
We can discuss this more with Oren in opensimulator.org/mantis/view.php?id=6008
Diffstat (limited to 'OpenSim/Framework/RegionSettings.cs')
-rw-r--r-- | OpenSim/Framework/RegionSettings.cs | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index 011a97a..4ce3392 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs | |||
@@ -29,7 +29,6 @@ using System; | |||
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | 30 | using System.IO; |
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using System.Runtime.Serialization; | ||
33 | 32 | ||
34 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
35 | { | 34 | { |
@@ -72,32 +71,6 @@ namespace OpenSim.Framework | |||
72 | 71 | ||
73 | return pos + offset; | 72 | return pos + offset; |
74 | } | 73 | } |
75 | |||
76 | /// <summary> | ||
77 | /// Returns a string representation of this SpawnPoint. | ||
78 | /// </summary> | ||
79 | /// <returns></returns> | ||
80 | public override string ToString() | ||
81 | { | ||
82 | return string.Format("{0},{1},{2}", Yaw, Pitch, Distance); | ||
83 | } | ||
84 | |||
85 | /// <summary> | ||
86 | /// Generate a SpawnPoint from a string | ||
87 | /// </summary> | ||
88 | /// <param name="str"></param> | ||
89 | public static SpawnPoint Parse(string str) | ||
90 | { | ||
91 | string[] parts = str.Split(','); | ||
92 | if (parts.Length != 3) | ||
93 | throw new ArgumentException("Invalid string: " + str); | ||
94 | |||
95 | SpawnPoint sp = new SpawnPoint(); | ||
96 | sp.Yaw = float.Parse(parts[0]); | ||
97 | sp.Pitch = float.Parse(parts[1]); | ||
98 | sp.Distance = float.Parse(parts[2]); | ||
99 | return sp; | ||
100 | } | ||
101 | } | 74 | } |
102 | 75 | ||
103 | public class RegionSettings | 76 | public class RegionSettings |
@@ -483,7 +456,7 @@ namespace OpenSim.Framework | |||
483 | } | 456 | } |
484 | 457 | ||
485 | // Connected Telehub object | 458 | // Connected Telehub object |
486 | private UUID m_TelehubObject = UUID.Zero; | 459 | private UUID m_TelehubObject; |
487 | public UUID TelehubObject | 460 | public UUID TelehubObject |
488 | { | 461 | { |
489 | get | 462 | get |