diff options
-rw-r--r-- | OpenSim/Data/MySQL/MySQLSimulationData.cs | 22 | ||||
-rw-r--r-- | OpenSim/Framework/RegionSettings.cs | 50 |
2 files changed, 25 insertions, 47 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index a2d5435..a48b91b 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs | |||
@@ -996,7 +996,11 @@ namespace OpenSim.Data.MySQL | |||
996 | "use_estate_sun, fixed_sun, sun_position, " + | 996 | "use_estate_sun, fixed_sun, sun_position, " + |
997 | "covenant, Sandbox, sunvectorx, sunvectory, " + | 997 | "covenant, Sandbox, sunvectorx, sunvectory, " + |
998 | "sunvectorz, loaded_creation_datetime, " + | 998 | "sunvectorz, loaded_creation_datetime, " + |
999 | "loaded_creation_id, map_tile_ID) values (?RegionUUID, ?BlockTerraform, " + | 999 | "loaded_creation_id, map_tile_ID, " + |
1000 | "TelehubEnabled, TelehubObject, TelehubName, " + | ||
1001 | "TelehubPosX, TelehubPosY, TelehubPosZ, " + | ||
1002 | "TelehubRotX, TelehubRotY, TelehubRotZ, TelehubRotW) " + | ||
1003 | "values (?RegionUUID, ?BlockTerraform, " + | ||
1000 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + | 1004 | "?BlockFly, ?AllowDamage, ?RestrictPushing, " + |
1001 | "?AllowLandResell, ?AllowLandJoinDivide, " + | 1005 | "?AllowLandResell, ?AllowLandJoinDivide, " + |
1002 | "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + | 1006 | "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + |
@@ -1011,7 +1015,10 @@ namespace OpenSim.Data.MySQL | |||
1011 | "?SunPosition, ?Covenant, ?Sandbox, " + | 1015 | "?SunPosition, ?Covenant, ?Sandbox, " + |
1012 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + | 1016 | "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + |
1013 | "?LoadedCreationDateTime, ?LoadedCreationID, " + | 1017 | "?LoadedCreationDateTime, ?LoadedCreationID, " + |
1014 | "?TerrainImageID)"; | 1018 | "?TerrainImageID, " + |
1019 | "?TelehubEnabled, ?TelehubObject, ?TelehubName, " + | ||
1020 | "?TelehubPosX, ?TelehubPosY, ?TelehubPosZ, " + | ||
1021 | "?TelehubRotX, ?TelehubRotY, ?TelehubRotZ, ?TelehubRotW )"; | ||
1015 | 1022 | ||
1016 | FillRegionSettingsCommand(cmd, rs); | 1023 | FillRegionSettingsCommand(cmd, rs); |
1017 | 1024 | ||
@@ -1643,7 +1650,16 @@ namespace OpenSim.Data.MySQL | |||
1643 | cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime); | 1650 | cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime); |
1644 | cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); | 1651 | cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); |
1645 | cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID); | 1652 | cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID); |
1646 | 1653 | cmd.Parameters.AddWithValue("TelehubEnabled", settings.HasTelehub); | |
1654 | cmd.Parameters.AddWithValue("TelehubObject", settings.TelehubObject); | ||
1655 | cmd.Parameters.AddWithValue("TelehubName", settings.TelehubName); | ||
1656 | cmd.Parameters.AddWithValue("TelehubPosX", settings.TelehubPos.X); | ||
1657 | cmd.Parameters.AddWithValue("TelehubPosY", settings.TelehubPos.Y); | ||
1658 | cmd.Parameters.AddWithValue("TelehubPosZ", settings.TelehubPos.Z); | ||
1659 | cmd.Parameters.AddWithValue("TelehubRotX", settings.TelehubRot.X); | ||
1660 | cmd.Parameters.AddWithValue("TelehubRotY", settings.TelehubRot.Y); | ||
1661 | cmd.Parameters.AddWithValue("TelehubRotZ", settings.TelehubRot.Z); | ||
1662 | cmd.Parameters.AddWithValue("TelehubRotW", settings.TelehubRot.W); | ||
1647 | } | 1663 | } |
1648 | 1664 | ||
1649 | /// <summary> | 1665 | /// <summary> |
diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index a2dd64f..9b5bbf2 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs | |||
@@ -449,17 +449,14 @@ namespace OpenSim.Framework | |||
449 | } | 449 | } |
450 | 450 | ||
451 | // Connected Telehub position | 451 | // Connected Telehub position |
452 | private float m_TelehubPosX; | 452 | private Vector3 m_TelehubPos; |
453 | private float m_TelehubPosY; | ||
454 | private float m_TelehubPosZ; | ||
455 | public Vector3 TelehubPos | 453 | public Vector3 TelehubPos |
456 | { | 454 | { |
457 | get | 455 | get |
458 | { | 456 | { |
459 | if (HasTelehub) | 457 | if (HasTelehub) |
460 | { | 458 | { |
461 | Vector3 Pos = new Vector3(m_TelehubPosX, m_TelehubPosY, m_TelehubPosZ); | 459 | return m_TelehubPos; |
462 | return Pos; | ||
463 | } | 460 | } |
464 | else | 461 | else |
465 | { | 462 | { |
@@ -468,53 +465,18 @@ namespace OpenSim.Framework | |||
468 | } | 465 | } |
469 | set | 466 | set |
470 | { | 467 | { |
471 | 468 | m_TelehubPos = value; | |
472 | m_TelehubPosX = value.X; | ||
473 | m_TelehubPosY = value.Y; | ||
474 | m_TelehubPosZ = value.Z; | ||
475 | } | 469 | } |
476 | } | 470 | } |
477 | 471 | ||
478 | // Connected Telehub rotation | 472 | // Connected Telehub rotation |
479 | private float m_TelehubRotX; | 473 | private Quaternion m_TelehubRot; |
480 | private float m_TelehubRotY; | ||
481 | private float m_TelehubRotZ; | ||
482 | private float m_TelehubRotW; | ||
483 | public Quaternion TelehubRot | 474 | public Quaternion TelehubRot |
484 | { | 475 | { |
485 | get | 476 | get |
486 | { | 477 | { return m_TelehubRot; } |
487 | if (HasTelehub) | ||
488 | { | ||
489 | Quaternion quat = new Quaternion(); | ||
490 | |||
491 | quat.X = m_TelehubRotX; | ||
492 | quat.Y = m_TelehubRotY; | ||
493 | quat.Z = m_TelehubRotZ; | ||
494 | quat.W = m_TelehubRotW; | ||
495 | |||
496 | return quat; | ||
497 | } | ||
498 | else | ||
499 | { | ||
500 | // What else to do?? | ||
501 | Quaternion quat = new Quaternion(); | ||
502 | |||
503 | quat.X = m_TelehubRotX; | ||
504 | quat.X = m_TelehubRotY; | ||
505 | quat.X = m_TelehubRotZ; | ||
506 | quat.X = m_TelehubRotW; | ||
507 | |||
508 | return quat; | ||
509 | } | ||
510 | } | ||
511 | set | 478 | set |
512 | { | 479 | { m_TelehubRot = value; } |
513 | m_TelehubRotX = value.X; | ||
514 | m_TelehubRotY = value.Y; | ||
515 | m_TelehubRotZ = value.Z; | ||
516 | m_TelehubRotW = value.W; | ||
517 | } | ||
518 | } | 480 | } |
519 | 481 | ||
520 | // Our Connected Telehub's SpawnPoints | 482 | // Our Connected Telehub's SpawnPoints |