diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | 84 |
1 files changed, 83 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 58d9455..2e1487f 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -53,6 +53,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
53 | protected EstateManagementCommands m_commands; | 53 | protected EstateManagementCommands m_commands; |
54 | 54 | ||
55 | private EstateTerrainXferHandler TerrainUploader; | 55 | private EstateTerrainXferHandler TerrainUploader; |
56 | public TelehubManager m_Telehub; | ||
56 | 57 | ||
57 | public event ChangeDelegate OnRegionInfoChange; | 58 | public event ChangeDelegate OnRegionInfoChange; |
58 | public event ChangeDelegate OnEstateInfoChange; | 59 | public event ChangeDelegate OnEstateInfoChange; |
@@ -599,6 +600,50 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
599 | } | 600 | } |
600 | } | 601 | } |
601 | 602 | ||
603 | public void handleOnEstateManageTelehub (IClientAPI client, UUID invoice, UUID senderID, string cmd, uint param1) | ||
604 | { | ||
605 | uint ObjectLocalID; | ||
606 | SceneObjectPart part; | ||
607 | |||
608 | switch (cmd) | ||
609 | { | ||
610 | case "info ui": | ||
611 | break; | ||
612 | |||
613 | case "connect": | ||
614 | // Add the Telehub | ||
615 | part = Scene.GetSceneObjectPart((uint)param1); | ||
616 | if (part == null) | ||
617 | return; | ||
618 | SceneObjectGroup grp = part.ParentGroup; | ||
619 | |||
620 | m_Telehub.Connect(grp); | ||
621 | break; | ||
622 | |||
623 | case "delete": | ||
624 | // Disconnect Telehub | ||
625 | m_Telehub.Disconnect(); | ||
626 | break; | ||
627 | |||
628 | case "spawnpoint add": | ||
629 | // Add SpawnPoint to the Telehub | ||
630 | part = Scene.GetSceneObjectPart((uint)param1); | ||
631 | if (part == null) | ||
632 | return; | ||
633 | m_Telehub.AddSpawnPoint(part.AbsolutePosition); | ||
634 | break; | ||
635 | |||
636 | case "spawnpoint remove": | ||
637 | // Remove SpawnPoint from Telehub | ||
638 | m_Telehub.RemoveSpawnPoint((int)param1); | ||
639 | break; | ||
640 | |||
641 | default: | ||
642 | break; | ||
643 | } | ||
644 | SendTelehubInfo(client); | ||
645 | } | ||
646 | |||
602 | private void SendSimulatorBlueBoxMessage( | 647 | private void SendSimulatorBlueBoxMessage( |
603 | IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) | 648 | IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) |
604 | { | 649 | { |
@@ -1055,7 +1100,9 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1055 | Scene.RegisterModuleInterface<IEstateModule>(this); | 1100 | Scene.RegisterModuleInterface<IEstateModule>(this); |
1056 | Scene.EventManager.OnNewClient += EventManager_OnNewClient; | 1101 | Scene.EventManager.OnNewClient += EventManager_OnNewClient; |
1057 | Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; | 1102 | Scene.EventManager.OnRequestChangeWaterHeight += changeWaterHeight; |
1058 | 1103 | ||
1104 | m_Telehub = new TelehubManager(scene); | ||
1105 | |||
1059 | m_commands = new EstateManagementCommands(this); | 1106 | m_commands = new EstateManagementCommands(this); |
1060 | m_commands.Initialise(); | 1107 | m_commands.Initialise(); |
1061 | } | 1108 | } |
@@ -1109,6 +1156,7 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1109 | client.OnEstateRestartSimRequest += handleEstateRestartSimRequest; | 1156 | client.OnEstateRestartSimRequest += handleEstateRestartSimRequest; |
1110 | client.OnEstateChangeCovenantRequest += handleChangeEstateCovenantRequest; | 1157 | client.OnEstateChangeCovenantRequest += handleChangeEstateCovenantRequest; |
1111 | client.OnEstateChangeInfo += handleEstateChangeInfo; | 1158 | client.OnEstateChangeInfo += handleEstateChangeInfo; |
1159 | client.OnEstateManageTelehub += handleOnEstateManageTelehub; | ||
1112 | client.OnUpdateEstateAccessDeltaRequest += handleEstateAccessDeltaRequest; | 1160 | client.OnUpdateEstateAccessDeltaRequest += handleEstateAccessDeltaRequest; |
1113 | client.OnSimulatorBlueBoxMessageRequest += SendSimulatorBlueBoxMessage; | 1161 | client.OnSimulatorBlueBoxMessageRequest += SendSimulatorBlueBoxMessage; |
1114 | client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage; | 1162 | client.OnEstateBlueBoxMessageRequest += SendEstateBlueBoxMessage; |
@@ -1243,5 +1291,39 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
1243 | if (onmessage != null) | 1291 | if (onmessage != null) |
1244 | onmessage(Scene.RegionInfo.RegionID, fromID, fromName, message); | 1292 | onmessage(Scene.RegionInfo.RegionID, fromID, fromName, message); |
1245 | } | 1293 | } |
1294 | |||
1295 | |||
1296 | private void SendTelehubInfo(IClientAPI client) | ||
1297 | { | ||
1298 | RegionSettings settings = | ||
1299 | this.Scene.RegionInfo.RegionSettings; | ||
1300 | |||
1301 | SceneObjectGroup telehub = null; | ||
1302 | if (settings.TelehubObject != UUID.Zero && | ||
1303 | (telehub = Scene.GetSceneObjectGroup(settings.TelehubObject)) != null) | ||
1304 | { | ||
1305 | List<Vector3> spawnPoints = new List<Vector3>(); | ||
1306 | |||
1307 | foreach (SpawnPoint sp in settings.SpawnPoints()) | ||
1308 | { | ||
1309 | spawnPoints.Add(sp.GetLocation(Vector3.Zero, Quaternion.Identity)); | ||
1310 | } | ||
1311 | |||
1312 | client.SendTelehubInfo(settings.TelehubObject, | ||
1313 | telehub.Name, | ||
1314 | telehub.AbsolutePosition, | ||
1315 | telehub.GroupRotation, | ||
1316 | spawnPoints); | ||
1317 | } | ||
1318 | else | ||
1319 | { | ||
1320 | client.SendTelehubInfo(UUID.Zero, | ||
1321 | String.Empty, | ||
1322 | Vector3.Zero, | ||
1323 | Quaternion.Identity, | ||
1324 | new List<Vector3>()); | ||
1325 | } | ||
1326 | } | ||
1246 | } | 1327 | } |
1247 | } | 1328 | } |
1329 | |||