diff options
author | UbitUmarov | 2012-07-17 00:54:23 +0100 |
---|---|---|
committer | UbitUmarov | 2012-07-17 00:54:23 +0100 |
commit | d5f4fb7b50fb7c594b018f8241399e22f88fc951 (patch) | |
tree | 8f3dab3d170596f02b1d1d836a0bc08a3e6b8ebd /OpenSim/Framework/RegionSettings.cs | |
parent | UbitOde: remove useless water collider from active code. (diff) | |
parent | Merge branch 'avination' into careminster (diff) | |
download | opensim-SC-d5f4fb7b50fb7c594b018f8241399e22f88fc951.zip opensim-SC-d5f4fb7b50fb7c594b018f8241399e22f88fc951.tar.gz opensim-SC-d5f4fb7b50fb7c594b018f8241399e22f88fc951.tar.bz2 opensim-SC-d5f4fb7b50fb7c594b018f8241399e22f88fc951.tar.xz |
Merge branch 'avination' into ubitwork
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/RegionSettings.cs | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index c142bd9..47a2780 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs | |||
@@ -29,6 +29,7 @@ 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; | ||
32 | 33 | ||
33 | namespace OpenSim.Framework | 34 | namespace 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 |
@@ -478,7 +505,7 @@ namespace OpenSim.Framework | |||
478 | } | 505 | } |
479 | 506 | ||
480 | // Connected Telehub object | 507 | // Connected Telehub object |
481 | private UUID m_TelehubObject; | 508 | private UUID m_TelehubObject = UUID.Zero; |
482 | public UUID TelehubObject | 509 | public UUID TelehubObject |
483 | { | 510 | { |
484 | get | 511 | get |