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.
This commit is contained in:
BlueWall
2012-01-21 23:26:27 -05:00
parent 590f707c42
commit 32d58d6e3e
6 changed files with 340 additions and 70 deletions

View File

@@ -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<Vector3> l_SpawnPoints = new List<Vector3>();
// 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<Vector3> SpawnPoints()
{
return l_SpawnPoints;
}
// Clear the SpawnPoints List of all entries
public void ClearSpawnPoints()
{
l_SpawnPoints.Clear();
}
}
}