From b0b7b45b943dd94546bcfcf5d3bb871cfe35b507 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 3 May 2012 19:38:35 +0300 Subject: Save the Telehub and its Spawn Points in the OAR Signed-off-by: BlueWall --- OpenSim/Framework/RegionSettings.cs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/RegionSettings.cs') diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index 4ce3392..011a97a 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.IO; using OpenMetaverse; +using System.Runtime.Serialization; namespace OpenSim.Framework { @@ -71,6 +72,32 @@ namespace OpenSim.Framework return pos + offset; } + + /// + /// Returns a string representation of this SpawnPoint. + /// + /// + public override string ToString() + { + return string.Format("{0},{1},{2}", Yaw, Pitch, Distance); + } + + /// + /// Generate a SpawnPoint from a string + /// + /// + public static SpawnPoint Parse(string str) + { + string[] parts = str.Split(','); + if (parts.Length != 3) + throw new ArgumentException("Invalid string: " + str); + + SpawnPoint sp = new SpawnPoint(); + sp.Yaw = float.Parse(parts[0]); + sp.Pitch = float.Parse(parts[1]); + sp.Distance = float.Parse(parts[2]); + return sp; + } } public class RegionSettings @@ -456,7 +483,7 @@ namespace OpenSim.Framework } // Connected Telehub object - private UUID m_TelehubObject; + private UUID m_TelehubObject = UUID.Zero; public UUID TelehubObject { get -- cgit v1.1 From 8b958e7e74d8e4b462c6a59c2854c5072ff8c746 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 12 May 2012 02:36:56 +0100 Subject: 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 --- OpenSim/Framework/RegionSettings.cs | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) (limited to 'OpenSim/Framework/RegionSettings.cs') 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; using System.Collections.Generic; using System.IO; using OpenMetaverse; -using System.Runtime.Serialization; namespace OpenSim.Framework { @@ -72,32 +71,6 @@ namespace OpenSim.Framework return pos + offset; } - - /// - /// Returns a string representation of this SpawnPoint. - /// - /// - public override string ToString() - { - return string.Format("{0},{1},{2}", Yaw, Pitch, Distance); - } - - /// - /// Generate a SpawnPoint from a string - /// - /// - public static SpawnPoint Parse(string str) - { - string[] parts = str.Split(','); - if (parts.Length != 3) - throw new ArgumentException("Invalid string: " + str); - - SpawnPoint sp = new SpawnPoint(); - sp.Yaw = float.Parse(parts[0]); - sp.Pitch = float.Parse(parts[1]); - sp.Distance = float.Parse(parts[2]); - return sp; - } } public class RegionSettings @@ -483,7 +456,7 @@ namespace OpenSim.Framework } // Connected Telehub object - private UUID m_TelehubObject = UUID.Zero; + private UUID m_TelehubObject; public UUID TelehubObject { get -- cgit v1.1 From 52a32878a9573681e3b56d0151c4a0903719eadf Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Thu, 3 May 2012 19:38:35 +0300 Subject: Save the Telehub and its Spawn Points in the OAR --- OpenSim/Framework/RegionSettings.cs | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework/RegionSettings.cs') diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index 4ce3392..47dbcec 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs @@ -29,6 +29,7 @@ using System; using System.Collections.Generic; using System.IO; using OpenMetaverse; +using System.Runtime.Serialization; namespace OpenSim.Framework { @@ -71,6 +72,32 @@ namespace OpenSim.Framework return pos + offset; } + + /// + /// Returns a string representation of this SpawnPoint. + /// + /// + public override string ToString() + { + return string.Format("{0},{1},{2}", Yaw, Pitch, Distance); + } + + /// + /// Generate a SpawnPoint from a string + /// + /// + public static SpawnPoint Parse(string str) + { + string[] parts = str.Split(','); + if (parts.Length != 3) + throw new ArgumentException("Invalid string: " + str); + + SpawnPoint sp = new SpawnPoint(); + sp.Yaw = float.Parse(parts[0]); + sp.Pitch = float.Parse(parts[1]); + sp.Distance = float.Parse(parts[2]); + return sp; + } } public class RegionSettings @@ -456,7 +483,7 @@ namespace OpenSim.Framework } // Connected Telehub object - private UUID m_TelehubObject; + private UUID m_TelehubObject = UUID.Zero; public UUID TelehubObject { get -- cgit v1.1