aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/RegionSettings.cs
diff options
context:
space:
mode:
authorOren Hurvitz2012-05-03 19:38:35 +0300
committerBlueWall2012-05-10 22:56:37 -0400
commitb0b7b45b943dd94546bcfcf5d3bb871cfe35b507 (patch)
treeb9bcaa15a5a1c85a8779fc7ab0a1b648cc700e01 /OpenSim/Framework/RegionSettings.cs
parentPrint out more information on connecting bots (diff)
downloadopensim-SC_OLD-b0b7b45b943dd94546bcfcf5d3bb871cfe35b507.zip
opensim-SC_OLD-b0b7b45b943dd94546bcfcf5d3bb871cfe35b507.tar.gz
opensim-SC_OLD-b0b7b45b943dd94546bcfcf5d3bb871cfe35b507.tar.bz2
opensim-SC_OLD-b0b7b45b943dd94546bcfcf5d3bb871cfe35b507.tar.xz
Save the Telehub and its Spawn Points in the OAR
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/RegionSettings.cs29
1 files changed, 28 insertions, 1 deletions
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;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using OpenMetaverse; 31using OpenMetaverse;
32using System.Runtime.Serialization;
32 33
33namespace OpenSim.Framework 34namespace OpenSim.Framework
34{ 35{
@@ -71,6 +72,32 @@ namespace OpenSim.Framework
71 72
72 return pos + offset; 73 return pos + offset;
73 } 74 }
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 }
74 } 101 }
75 102
76 public class RegionSettings 103 public class RegionSettings
@@ -456,7 +483,7 @@ namespace OpenSim.Framework
456 } 483 }
457 484
458 // Connected Telehub object 485 // Connected Telehub object
459 private UUID m_TelehubObject; 486 private UUID m_TelehubObject = UUID.Zero;
460 public UUID TelehubObject 487 public UUID TelehubObject
461 { 488 {
462 get 489 get