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/Serialization/External/RegionSettingsSerializer.cs | |
parent | Save the Telehub and its Spawn Points in the OAR (diff) | |
download | opensim-SC_OLD-8b958e7e74d8e4b462c6a59c2854c5072ff8c746.zip opensim-SC_OLD-8b958e7e74d8e4b462c6a59c2854c5072ff8c746.tar.gz opensim-SC_OLD-8b958e7e74d8e4b462c6a59c2854c5072ff8c746.tar.bz2 opensim-SC_OLD-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/Serialization/External/RegionSettingsSerializer.cs')
-rw-r--r-- | OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs index f18435d..931898c 100644 --- a/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs +++ b/OpenSim/Framework/Serialization/External/RegionSettingsSerializer.cs | |||
@@ -30,8 +30,6 @@ using System.Text; | |||
30 | using System.Xml; | 30 | using System.Xml; |
31 | using OpenMetaverse; | 31 | using OpenMetaverse; |
32 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
33 | using log4net; | ||
34 | using System.Reflection; | ||
35 | 33 | ||
36 | namespace OpenSim.Framework.Serialization.External | 34 | namespace OpenSim.Framework.Serialization.External |
37 | { | 35 | { |
@@ -189,29 +187,7 @@ namespace OpenSim.Framework.Serialization.External | |||
189 | break; | 187 | break; |
190 | } | 188 | } |
191 | } | 189 | } |
192 | 190 | ||
193 | xtr.ReadEndElement(); | ||
194 | |||
195 | if (xtr.IsStartElement("Telehub")) | ||
196 | { | ||
197 | xtr.ReadStartElement("Telehub"); | ||
198 | |||
199 | while (xtr.Read() && xtr.NodeType != XmlNodeType.EndElement) | ||
200 | { | ||
201 | switch (xtr.Name) | ||
202 | { | ||
203 | case "TelehubObject": | ||
204 | settings.TelehubObject = UUID.Parse(xtr.ReadElementContentAsString()); | ||
205 | break; | ||
206 | case "SpawnPoint": | ||
207 | string str = xtr.ReadElementContentAsString(); | ||
208 | SpawnPoint sp = SpawnPoint.Parse(str); | ||
209 | settings.AddSpawnPoint(sp); | ||
210 | break; | ||
211 | } | ||
212 | } | ||
213 | } | ||
214 | |||
215 | xtr.Close(); | 191 | xtr.Close(); |
216 | sr.Close(); | 192 | sr.Close(); |
217 | 193 | ||
@@ -267,16 +243,7 @@ namespace OpenSim.Framework.Serialization.External | |||
267 | xtw.WriteElementString("SunPosition", settings.SunPosition.ToString()); | 243 | xtw.WriteElementString("SunPosition", settings.SunPosition.ToString()); |
268 | // Note: 'SunVector' isn't saved because this value is owned by the Sun Module, which | 244 | // Note: 'SunVector' isn't saved because this value is owned by the Sun Module, which |
269 | // calculates it automatically according to the date and other factors. | 245 | // calculates it automatically according to the date and other factors. |
270 | xtw.WriteEndElement(); | 246 | xtw.WriteEndElement(); |
271 | |||
272 | xtw.WriteStartElement("Telehub"); | ||
273 | if (settings.TelehubObject != UUID.Zero) | ||
274 | { | ||
275 | xtw.WriteElementString("TelehubObject", settings.TelehubObject.ToString()); | ||
276 | foreach (SpawnPoint sp in settings.SpawnPoints()) | ||
277 | xtw.WriteElementString("SpawnPoint", sp.ToString()); | ||
278 | } | ||
279 | xtw.WriteEndElement(); | ||
280 | 247 | ||
281 | xtw.WriteEndElement(); | 248 | xtw.WriteEndElement(); |
282 | 249 | ||