diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 39 | ||||
-rw-r--r-- | OpenSim/Framework/RegionSettings.cs | 50 |
2 files changed, 41 insertions, 48 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index afd42d7..bddb971 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -1011,7 +1011,11 @@ namespace OpenSim.Data.MySQL | |||
1011 | "use_estate_sun, fixed_sun, sun_position, " + | 1011 | "use_estate_sun, fixed_sun, sun_position, " + |
1012 | "covenant, Sandbox, sunvectorx, sunvectory, " + | 1012 | "covenant, Sandbox, sunvectorx, sunvectory, " + |
1013 | "sunvectorz, loaded_creation_datetime, " + | 1013 | "sunvectorz, loaded_creation_datetime, " + |
1014 | "loaded_creation_id, map_tile_ID, block_search, casino) values (?RegionUUID, ?BlockTerraform, " + | 1014 | "loaded_creation_id, map_tile_ID, block_search, casino, " + |
1015 | "TelehubEnabled, TelehubObject, TelehubName, " + | ||
1016 | "TelehubPosX, TelehubPosY, TelehubPosZ, " + | ||
1017 | "TelehubRotX, TelehubRotY, TelehubRotZ, TelehubRotW) " + | ||
1018 | "values (?RegionUUID, ?BlockTerraform, " + | ||
1015 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + | 1019 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + |
1016 | "?AllowLandResell, ?AllowLandJoinDivide, " + | 1020 | "?AllowLandResell, ?AllowLandJoinDivide, " + |
1017 | "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + | 1021 | "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + |
@@ -1026,7 +1030,10 @@ namespace OpenSim.Data.MySQL | |||
1026 | "?SunPosition, ?Covenant, ?Sandbox, " + | 1030 | "?SunPosition, ?Covenant, ?Sandbox, " + |
1027 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + | 1031 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + |
1028 | "?LoadedCreationDateTime, ?LoadedCreationID, " + | 1032 | "?LoadedCreationDateTime, ?LoadedCreationID, " + |
1029 | "?TerrainImageID, ?block_search, ?casino)"; | 1033 | "?TerrainImageID, ?block_search, ?casino, " + |
1034 | "?TelehubEnabled, ?TelehubObject, ?TelehubName, " + | ||
1035 | "?TelehubPosX, ?TelehubPosY, ?TelehubPosZ, " + | ||
1036 | "?TelehubRotX, ?TelehubRotY, ?TelehubRotZ, ?TelehubRotW )"; | ||
1030 | 1037 | ||
1031 | FillRegionSettingsCommand(cmd, rs); | 1038 | FillRegionSettingsCommand(cmd, rs); |
1032 | 1039 | ||
@@ -1314,6 +1321,20 @@ namespace OpenSim.Data.MySQL | |||
1314 | newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; | 1321 | newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; |
1315 | 1322 | ||
1316 | newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); | 1323 | newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); |
1324 | newSettings.HasTelehub = Convert.ToBoolean(row["TelehubEnabled"]); | ||
1325 | newSettings.TelehubObject = DBGuid.FromDB(row["TelehubObject"]); | ||
1326 | newSettings.TelehubName = (string) row["TelehubName"]; | ||
1327 | newSettings.TelehubPos = new Vector3 ( | ||
1328 | Convert.ToSingle(row["TelehubPosX"]), | ||
1329 | Convert.ToSingle(row["TelehubPosY"]), | ||
1330 | Convert.ToSingle(row["TelehubPosZ"]) | ||
1331 | ); | ||
1332 | newSettings.TelehubRot = new Quaternion ( | ||
1333 | Convert.ToSingle(row["TelehubRotX"]), | ||
1334 | Convert.ToSingle(row["TelehubRotY"]), | ||
1335 | Convert.ToSingle(row["TelehubRotZ"]), | ||
1336 | Convert.ToSingle(row["TelehubRotW"]) | ||
1337 | ); | ||
1317 | 1338 | ||
1318 | newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]); | 1339 | newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]); |
1319 | newSettings.Casino = Convert.ToBoolean(row["casino"]); | 1340 | newSettings.Casino = Convert.ToBoolean(row["casino"]); |
@@ -1654,6 +1675,16 @@ namespace OpenSim.Data.MySQL | |||
1654 | cmd.Parameters.AddWithValue("block_search", settings.GodBlockSearch); | 1675 | cmd.Parameters.AddWithValue("block_search", settings.GodBlockSearch); |
1655 | cmd.Parameters.AddWithValue("casino", settings.Casino); | 1676 | cmd.Parameters.AddWithValue("casino", settings.Casino); |
1656 | 1677 | ||
1678 | cmd.Parameters.AddWithValue("TelehubEnabled", settings.HasTelehub); | ||
1679 | cmd.Parameters.AddWithValue("TelehubObject", settings.TelehubObject); | ||
1680 | cmd.Parameters.AddWithValue("TelehubName", settings.TelehubName); | ||
1681 | cmd.Parameters.AddWithValue("TelehubPosX", settings.TelehubPos.X); | ||
1682 | cmd.Parameters.AddWithValue("TelehubPosY", settings.TelehubPos.Y); | ||
1683 | cmd.Parameters.AddWithValue("TelehubPosZ", settings.TelehubPos.Z); | ||
1684 | cmd.Parameters.AddWithValue("TelehubRotX", settings.TelehubRot.X); | ||
1685 | cmd.Parameters.AddWithValue("TelehubRotY", settings.TelehubRot.Y); | ||
1686 | cmd.Parameters.AddWithValue("TelehubRotZ", settings.TelehubRot.Z); | ||
1687 | cmd.Parameters.AddWithValue("TelehubRotW", settings.TelehubRot.W); | ||
1657 | } | 1688 | } |
1658 | 1689 | ||
1659 | /// <summary> | 1690 | /// <summary> |
@@ -1906,11 +1937,11 @@ namespace OpenSim.Data.MySQL | |||
1906 | 1937 | ||
1907 | cmd.Parameters.Clear(); | 1938 | cmd.Parameters.Clear(); |
1908 | 1939 | ||
1909 | cmd.CommandText = "insert into spawn_points (RegionID, PointX, PointY, PointZ) values ( ?EstateID, ?PointX, ?PointY,?PointZ)"; | 1940 | cmd.CommandText = "insert into spawn_points (RegionID, PointX, PointY, PointZ) values ( ?RegionID, ?PointX, ?PointY,?PointZ)"; |
1910 | 1941 | ||
1911 | foreach (Vector3 p in rs.SpawnPoints()) | 1942 | foreach (Vector3 p in rs.SpawnPoints()) |
1912 | { | 1943 | { |
1913 | cmd.Parameters.AddWithValue("?EstateID", rs.RegionUUID.ToString()); | 1944 | cmd.Parameters.AddWithValue("?RegionID", rs.RegionUUID.ToString()); |
1914 | cmd.Parameters.AddWithValue("?PointX", p.X); | 1945 | cmd.Parameters.AddWithValue("?PointX", p.X); |
1915 | cmd.Parameters.AddWithValue("?PointY", p.Y); | 1946 | cmd.Parameters.AddWithValue("?PointY", p.Y); |
1916 | cmd.Parameters.AddWithValue("?PointZ", p.Z); | 1947 | cmd.Parameters.AddWithValue("?PointZ", p.Z); |
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index 2c9f7d2..01406ce 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs | |||
@@ -463,17 +463,14 @@ namespace OpenSim.Framework | |||
463 | } | 463 | } |
464 | 464 | ||
465 | // Connected Telehub position | 465 | // Connected Telehub position |
466 | private float m_TelehubPosX; | 466 | private Vector3 m_TelehubPos; |
467 | private float m_TelehubPosY; | ||
468 | private float m_TelehubPosZ; | ||
469 | public Vector3 TelehubPos | 467 | public Vector3 TelehubPos |
470 | { | 468 | { |
471 | get | 469 | get |
472 | { | 470 | { |
473 | if (HasTelehub) | 471 | if (HasTelehub) |
474 | { | 472 | { |
475 | Vector3 Pos = new Vector3(m_TelehubPosX, m_TelehubPosY, m_TelehubPosZ); | 473 | return m_TelehubPos; |
476 | return Pos; | ||
477 | } | 474 | } |
478 | else | 475 | else |
479 | { | 476 | { |
@@ -482,53 +479,18 @@ namespace OpenSim.Framework | |||
482 | } | 479 | } |
483 | set | 480 | set |
484 | { | 481 | { |
485 | 482 | m_TelehubPos = value; | |
486 | m_TelehubPosX = value.X; | ||
487 | m_TelehubPosY = value.Y; | ||
488 | m_TelehubPosZ = value.Z; | ||
489 | } | 483 | } |
490 | } | 484 | } |
491 | 485 | ||
492 | // Connected Telehub rotation | 486 | // Connected Telehub rotation |
493 | private float m_TelehubRotX; | 487 | private Quaternion m_TelehubRot; |
494 | private float m_TelehubRotY; | ||
495 | private float m_TelehubRotZ; | ||
496 | private float m_TelehubRotW; | ||
497 | public Quaternion TelehubRot | 488 | public Quaternion TelehubRot |
498 | { | 489 | { |
499 | get | 490 | get |
500 | { | 491 | { return m_TelehubRot; } |
501 | if (HasTelehub) | ||
502 | { | ||
503 | Quaternion quat = new Quaternion(); | ||
504 | |||
505 | quat.X = m_TelehubRotX; | ||
506 | quat.Y = m_TelehubRotY; | ||
507 | quat.Z = m_TelehubRotZ; | ||
508 | quat.W = m_TelehubRotW; | ||
509 | |||
510 | return quat; | ||
511 | } | ||
512 | else | ||
513 | { | ||
514 | // What else to do?? | ||
515 | Quaternion quat = new Quaternion(); | ||
516 | |||
517 | quat.X = m_TelehubRotX; | ||
518 | quat.X = m_TelehubRotY; | ||
519 | quat.X = m_TelehubRotZ; | ||
520 | quat.X = m_TelehubRotW; | ||
521 | |||
522 | return quat; | ||
523 | } | ||
524 | } | ||
525 | set | 492 | set |
526 | { | 493 | { m_TelehubRot = value; } |
527 | m_TelehubRotX = value.X; | ||
528 | m_TelehubRotY = value.Y; | ||
529 | m_TelehubRotZ = value.Z; | ||
530 | m_TelehubRotW = value.W; | ||
531 | } | ||
532 | } | 494 | } |
533 | 495 | ||
534 | // Our Connected Telehub's SpawnPoints | 496 | // Our Connected Telehub's SpawnPoints |