aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World
diff options
context:
space:
mode:
authorMelanie2012-01-22 11:36:04 +0000
committerMelanie2012-01-22 11:36:04 +0000
commit68365c20c0b3a3164881398f3bc3710f7960c52d (patch)
treebef00ac36c0dc8f33c1df3066c9d0e09dbb71aa9 /OpenSim/Region/CoreModules/World
parentTelehub Support: (diff)
downloadopensim-SC-68365c20c0b3a3164881398f3bc3710f7960c52d.zip
opensim-SC-68365c20c0b3a3164881398f3bc3710f7960c52d.tar.gz
opensim-SC-68365c20c0b3a3164881398f3bc3710f7960c52d.tar.bz2
opensim-SC-68365c20c0b3a3164881398f3bc3710f7960c52d.tar.xz
Move Telehub tables and data from EstateSettings to RegionSettings.
This is damage control es EstateSettings is not the place this can be put. EstateSettings is nt unique to a region and therefore would introduce a hard limit of one telehub per estate, completely shutting off the option of having SL style telehubs, e.g. one per region. Whole estate teleport routing can still be implemented id desiresd, this way all options are open while the other way most options get closed off.
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs12
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs46
2 files changed, 28 insertions, 30 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
index 6a02ffe..cdcea65 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs
@@ -609,9 +609,9 @@ namespace OpenSim.Region.CoreModules.World.Estate
609 { 609 {
610 case "info ui": 610 case "info ui":
611 // Send info: 611 // Send info:
612 if (Scene.RegionInfo.EstateSettings.HasTelehub) 612 if (Scene.RegionInfo.RegionSettings.HasTelehub)
613 { 613 {
614 EstateSettings settings = this.Scene.RegionInfo.EstateSettings; 614 RegionSettings settings = this.Scene.RegionInfo.RegionSettings;
615 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos, 615 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos,
616 settings.TelehubRot, settings.SpawnPoints()); 616 settings.TelehubRot, settings.SpawnPoints());
617 } 617 }
@@ -626,7 +626,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
626 part = Scene.GetSceneObjectPart((uint)param1); 626 part = Scene.GetSceneObjectPart((uint)param1);
627 if (m_Telehub.Connect(part)) 627 if (m_Telehub.Connect(part))
628 { 628 {
629 EstateSettings settings = this.Scene.RegionInfo.EstateSettings; 629 RegionSettings settings = this.Scene.RegionInfo.RegionSettings;
630 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos, 630 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos,
631 settings.TelehubRot, settings.SpawnPoints()); 631 settings.TelehubRot, settings.SpawnPoints());
632 } 632 }
@@ -637,7 +637,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
637 part = Scene.GetSceneObjectPart((uint)param1); 637 part = Scene.GetSceneObjectPart((uint)param1);
638 if (m_Telehub.DisConnect(part)) 638 if (m_Telehub.DisConnect(part))
639 { 639 {
640 EstateSettings settings = this.Scene.RegionInfo.EstateSettings; 640 RegionSettings settings = this.Scene.RegionInfo.RegionSettings;
641 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos, 641 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos,
642 settings.TelehubRot, settings.SpawnPoints()); 642 settings.TelehubRot, settings.SpawnPoints());
643 } 643 }
@@ -648,7 +648,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
648 part = Scene.GetSceneObjectPart((uint)param1); 648 part = Scene.GetSceneObjectPart((uint)param1);
649 if( m_Telehub.AddSpawnPoint(part.AbsolutePosition)) 649 if( m_Telehub.AddSpawnPoint(part.AbsolutePosition))
650 { 650 {
651 EstateSettings settings = this.Scene.RegionInfo.EstateSettings; 651 RegionSettings settings = this.Scene.RegionInfo.RegionSettings;
652 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos, 652 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos,
653 settings.TelehubRot, settings.SpawnPoints()); 653 settings.TelehubRot, settings.SpawnPoints());
654 } 654 }
@@ -658,7 +658,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
658 // Remove SpawnPoint from Telehub 658 // Remove SpawnPoint from Telehub
659 if (m_Telehub.RemoveSpawnPoint((int)param1)) 659 if (m_Telehub.RemoveSpawnPoint((int)param1))
660 { 660 {
661 EstateSettings settings = this.Scene.RegionInfo.EstateSettings; 661 RegionSettings settings = this.Scene.RegionInfo.RegionSettings;
662 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos, 662 client.SendTelehubInfo(settings.TelehubObject, settings.TelehubName, settings.TelehubPos,
663 settings.TelehubRot, settings.SpawnPoints()); 663 settings.TelehubRot, settings.SpawnPoints());
664 } 664 }
diff --git a/OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs b/OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs
index 309ef13..ee77ae1 100644
--- a/OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/TelehubManager.cs
@@ -44,7 +44,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
44 UUID EstateID; 44 UUID EstateID;
45 bool m_HasTelehub = false; 45 bool m_HasTelehub = false;
46 Scene m_Scene; 46 Scene m_Scene;
47 EstateSettings m_EstateSettings;
48 // This will get an option... 47 // This will get an option...
49 Vector3 InitialSpawnPoint = new Vector3(0.0f,0.0f,0.0f); 48 Vector3 InitialSpawnPoint = new Vector3(0.0f,0.0f,0.0f);
50 49
@@ -56,7 +55,6 @@ namespace OpenSim.Region.CoreModules.World.Estate
56 public TelehubManager(Scene scene) 55 public TelehubManager(Scene scene)
57 { 56 {
58 m_Scene = scene; 57 m_Scene = scene;
59 m_EstateSettings = m_Scene.RegionInfo.EstateSettings;
60 } 58 }
61 59
62 // Fill our Telehub struct with values 60 // Fill our Telehub struct with values
@@ -76,17 +74,17 @@ namespace OpenSim.Region.CoreModules.World.Estate
76 // Connect the Telehub 74 // Connect the Telehub
77 public bool Connect(SceneObjectPart part) 75 public bool Connect(SceneObjectPart part)
78 { 76 {
79 m_EstateSettings.ClearSpawnPoints(); 77 m_Scene.RegionInfo.RegionSettings.ClearSpawnPoints();
80 78
81 m_EstateSettings.TelehubObject = part.UUID; 79 m_Scene.RegionInfo.RegionSettings.TelehubObject = part.UUID;
82 m_EstateSettings.TelehubName = part.Name; 80 m_Scene.RegionInfo.RegionSettings.TelehubName = part.Name;
83 m_EstateSettings.TelehubPos = part.AbsolutePosition; 81 m_Scene.RegionInfo.RegionSettings.TelehubPos = part.AbsolutePosition;
84 m_EstateSettings.TelehubRot = part.GetWorldRotation(); 82 m_Scene.RegionInfo.RegionSettings.TelehubRot = part.GetWorldRotation();
85 83
86 // Clear this for now 84 // Clear this for now
87 m_EstateSettings.AddSpawnPoint(InitialSpawnPoint); 85 m_Scene.RegionInfo.RegionSettings.AddSpawnPoint(InitialSpawnPoint);
88 m_EstateSettings.HasTelehub = true; 86 m_Scene.RegionInfo.RegionSettings.HasTelehub = true;
89 m_EstateSettings.Save(); 87 m_Scene.RegionInfo.RegionSettings.Save();
90 return true; 88 return true;
91 } 89 }
92 90
@@ -96,14 +94,14 @@ namespace OpenSim.Region.CoreModules.World.Estate
96 bool result = false; 94 bool result = false;
97 95
98 try{ 96 try{
99 m_EstateSettings.TelehubObject = UUID.Zero; 97 m_Scene.RegionInfo.RegionSettings.TelehubObject = UUID.Zero;
100 m_EstateSettings.TelehubName = String.Empty; 98 m_Scene.RegionInfo.RegionSettings.TelehubName = String.Empty;
101 m_EstateSettings.TelehubPos = Vector3.Zero; 99 m_Scene.RegionInfo.RegionSettings.TelehubPos = Vector3.Zero;
102 // This is probably wrong! But, HasTelehub will block access 100 // This is probably wrong! But, HasTelehub will block access
103 m_EstateSettings.TelehubRot = Quaternion.Identity; 101 m_Scene.RegionInfo.RegionSettings.TelehubRot = Quaternion.Identity;
104 m_EstateSettings.ClearSpawnPoints(); 102 m_Scene.RegionInfo.RegionSettings.ClearSpawnPoints();
105 m_EstateSettings.HasTelehub = false; 103 m_Scene.RegionInfo.RegionSettings.HasTelehub = false;
106 m_EstateSettings.Save(); 104 m_Scene.RegionInfo.RegionSettings.Save();
107 result = true; 105 result = true;
108 } 106 }
109 catch (Exception ex) 107 catch (Exception ex)
@@ -122,22 +120,22 @@ namespace OpenSim.Region.CoreModules.World.Estate
122 public bool AddSpawnPoint(Vector3 point) 120 public bool AddSpawnPoint(Vector3 point)
123 { 121 {
124 122
125 float dist = (float) Util.GetDistanceTo(m_EstateSettings.TelehubPos, point); 123 float dist = (float) Util.GetDistanceTo(m_Scene.RegionInfo.RegionSettings.TelehubPos, point);
126 Vector3 nvec = Util.GetNormalizedVector(point - m_EstateSettings.TelehubPos); 124 Vector3 nvec = Util.GetNormalizedVector(point - m_Scene.RegionInfo.RegionSettings.TelehubPos);
127 Vector3 spoint = nvec * dist; 125 Vector3 spoint = nvec * dist;
128 126
129 m_EstateSettings.AddSpawnPoint(spoint); 127 m_Scene.RegionInfo.RegionSettings.AddSpawnPoint(spoint);
130 m_EstateSettings.Save(); 128 m_Scene.RegionInfo.RegionSettings.Save();
131 return true; 129 return true;
132 } 130 }
133 131
134 // Remove a SpawnPoint from the Telehub 132 // Remove a SpawnPoint from the Telehub
135 public bool RemoveSpawnPoint(int spawnpoint) 133 public bool RemoveSpawnPoint(int spawnpoint)
136 { 134 {
137 m_EstateSettings.RemoveSpawnPoint(spawnpoint); 135 m_Scene.RegionInfo.RegionSettings.RemoveSpawnPoint(spawnpoint);
138 m_EstateSettings.Save(); 136 m_Scene.RegionInfo.RegionSettings.Save();
139 137
140 return true; 138 return true;
141 } 139 }
142 } 140 }
143} \ No newline at end of file 141}