From 32d58d6e3e9a0ea1bfa808567d0f64c0652f8a85 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Sat, 21 Jan 2012 23:26:27 -0500 Subject: Telehub Support: Telehub settings now persist to the database and are saved across sim restarts. So-far this only works on MySQL. this is a work in progress, teleport routing is not yet implemented. --- OpenSim/Framework/EstateSettings.cs | 150 ++++++++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) (limited to 'OpenSim/Framework/EstateSettings.cs') diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index 2a495b0..9bdeab8 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs @@ -373,5 +373,155 @@ namespace OpenSim.Framework return l_EstateAccess.Contains(user); } + + // Telehub support + private bool m_TelehubEnabled = false; + public bool HasTelehub + { + get { return m_TelehubEnabled; } + set { m_TelehubEnabled = value; } + } + + // Connected Telehub object + private UUID m_TelehubObject; + public UUID TelehubObject + { + get + { + if (HasTelehub) + { + return m_TelehubObject; + } + else + { + return UUID.Zero; + } + } + set + { + m_TelehubObject = value; + } + } + + // Connected Telehub name + private string m_TelehubName; + public string TelehubName + { + get + { + if (HasTelehub) + { + return m_TelehubName; + } + else + { + return String.Empty; + } + } + set + { + m_TelehubName = value; + } + } + + // Connected Telehub position + private float m_TelehubPosX; + private float m_TelehubPosY; + private float m_TelehubPosZ; + public Vector3 TelehubPos + { + get + { + if (HasTelehub) + { + Vector3 Pos = new Vector3(m_TelehubPosX, m_TelehubPosY, m_TelehubPosZ); + return Pos; + } + else + { + return Vector3.Zero; + } + } + set + { + + m_TelehubPosX = value.X; + m_TelehubPosY = value.Y; + m_TelehubPosZ = value.Z; + } + } + + // Connected Telehub rotation + private float m_TelehubRotX; + private float m_TelehubRotY; + private float m_TelehubRotZ; + private float m_TelehubRotW; + public Quaternion TelehubRot + { + get + { + if (HasTelehub) + { + Quaternion quat = new Quaternion(); + + quat.X = m_TelehubRotX; + quat.Y = m_TelehubRotY; + quat.Z = m_TelehubRotZ; + quat.W = m_TelehubRotW; + + return quat; + } + else + { + // What else to do?? + Quaternion quat = new Quaternion(); + + quat.X = m_TelehubRotX; + quat.X = m_TelehubRotY; + quat.X = m_TelehubRotZ; + quat.X = m_TelehubRotW; + + return quat; + } + } + set + { + m_TelehubRotX = value.X; + m_TelehubRotY = value.Y; + m_TelehubRotZ = value.Z; + m_TelehubRotW = value.W; + } + } + + // Our Connected Telehub's SpawnPoints + public List l_SpawnPoints = new List(); + + // Add a SpawnPoint + // ** These are not region coordinates ** + // They are relative to the Telehub coordinates + // + public void AddSpawnPoint(Vector3 point) + { + l_SpawnPoints.Add(point); + } + + // Remove a SpawnPoint + public void RemoveSpawnPoint(int point_index) + { + l_SpawnPoints.RemoveAt(point_index); + } + + // Return the List of SpawnPoints + public List SpawnPoints() + { + return l_SpawnPoints; + + } + + // Clear the SpawnPoints List of all entries + public void ClearSpawnPoints() + { + l_SpawnPoints.Clear(); + } } } -- cgit v1.1