Finish connecting Telehub to database

iar_mods
BlueWall 2012-01-22 14:51:15 -05:00
parent 1cd26ba85e
commit 74c1ed77a4
2 changed files with 25 additions and 47 deletions

View File

@ -996,7 +996,11 @@ namespace OpenSim.Data.MySQL
"use_estate_sun, fixed_sun, sun_position, " +
"covenant, Sandbox, sunvectorx, sunvectory, " +
"sunvectorz, loaded_creation_datetime, " +
"loaded_creation_id, map_tile_ID) values (?RegionUUID, ?BlockTerraform, " +
"loaded_creation_id, map_tile_ID, " +
"TelehubEnabled, TelehubObject, TelehubName, " +
"TelehubPosX, TelehubPosY, TelehubPosZ, " +
"TelehubRotX, TelehubRotY, TelehubRotZ, TelehubRotW) " +
"values (?RegionUUID, ?BlockTerraform, " +
"?BlockFly, ?AllowDamage, ?RestrictPushing, " +
"?AllowLandResell, ?AllowLandJoinDivide, " +
"?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " +
@ -1011,7 +1015,10 @@ namespace OpenSim.Data.MySQL
"?SunPosition, ?Covenant, ?Sandbox, " +
"?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
"?LoadedCreationDateTime, ?LoadedCreationID, " +
"?TerrainImageID)";
"?TerrainImageID, " +
"?TelehubEnabled, ?TelehubObject, ?TelehubName, " +
"?TelehubPosX, ?TelehubPosY, ?TelehubPosZ, " +
"?TelehubRotX, ?TelehubRotY, ?TelehubRotZ, ?TelehubRotW )";
FillRegionSettingsCommand(cmd, rs);
@ -1643,7 +1650,16 @@ namespace OpenSim.Data.MySQL
cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime);
cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID);
cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID);
cmd.Parameters.AddWithValue("TelehubEnabled", settings.HasTelehub);
cmd.Parameters.AddWithValue("TelehubObject", settings.TelehubObject);
cmd.Parameters.AddWithValue("TelehubName", settings.TelehubName);
cmd.Parameters.AddWithValue("TelehubPosX", settings.TelehubPos.X);
cmd.Parameters.AddWithValue("TelehubPosY", settings.TelehubPos.Y);
cmd.Parameters.AddWithValue("TelehubPosZ", settings.TelehubPos.Z);
cmd.Parameters.AddWithValue("TelehubRotX", settings.TelehubRot.X);
cmd.Parameters.AddWithValue("TelehubRotY", settings.TelehubRot.Y);
cmd.Parameters.AddWithValue("TelehubRotZ", settings.TelehubRot.Z);
cmd.Parameters.AddWithValue("TelehubRotW", settings.TelehubRot.W);
}
/// <summary>

View File

@ -449,17 +449,14 @@ namespace OpenSim.Framework
}
// Connected Telehub position
private float m_TelehubPosX;
private float m_TelehubPosY;
private float m_TelehubPosZ;
private Vector3 m_TelehubPos;
public Vector3 TelehubPos
{
get
{
if (HasTelehub)
{
Vector3 Pos = new Vector3(m_TelehubPosX, m_TelehubPosY, m_TelehubPosZ);
return Pos;
return m_TelehubPos;
}
else
{
@ -468,53 +465,18 @@ namespace OpenSim.Framework
}
set
{
m_TelehubPosX = value.X;
m_TelehubPosY = value.Y;
m_TelehubPosZ = value.Z;
m_TelehubPos = value;
}
}
// Connected Telehub rotation
private float m_TelehubRotX;
private float m_TelehubRotY;
private float m_TelehubRotZ;
private float m_TelehubRotW;
private Quaternion m_TelehubRot;
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;
}
}
{ return m_TelehubRot; }
set
{
m_TelehubRotX = value.X;
m_TelehubRotY = value.Y;
m_TelehubRotZ = value.Z;
m_TelehubRotW = value.W;
}
{ m_TelehubRot = value; }
}
// Our Connected Telehub's SpawnPoints