aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authorMW2009-05-21 10:41:16 +0000
committerMW2009-05-21 10:41:16 +0000
commite4d68964ddee0ce26154d8d38c102a96e0adef10 (patch)
treee2a6c3ee1528c0b2f2b9cbd70fe43798c0bcded5 /OpenSim/Region/Framework/Scenes/Scene.cs
parentPut some meat on the bones of the REST console. NO user functionality yet (diff)
downloadopensim-SC-e4d68964ddee0ce26154d8d38c102a96e0adef10.zip
opensim-SC-e4d68964ddee0ce26154d8d38c102a96e0adef10.tar.gz
opensim-SC-e4d68964ddee0ce26154d8d38c102a96e0adef10.tar.bz2
opensim-SC-e4d68964ddee0ce26154d8d38c102a96e0adef10.tar.xz
Added ITeleportModule interface, and added a hook into scene so if a module has registered this interface then that handles teleport requests rather the SceneCommunicationService.
As by default there is no ITeleportModule registered, Teleports by default will still be handled by SceneCommunicationService.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs26
1 files changed, 13 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a650ec5..f18d542 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -147,6 +147,7 @@ namespace OpenSim.Region.Framework.Scenes
147 protected IInterregionCommsOut m_interregionCommsOut; 147 protected IInterregionCommsOut m_interregionCommsOut;
148 protected IInterregionCommsIn m_interregionCommsIn; 148 protected IInterregionCommsIn m_interregionCommsIn;
149 protected IDialogModule m_dialogModule; 149 protected IDialogModule m_dialogModule;
150 protected ITeleportModule m_teleportModule;
150 151
151 protected ICapabilitiesModule m_capsModule; 152 protected ICapabilitiesModule m_capsModule;
152 public ICapabilitiesModule CapsModule 153 public ICapabilitiesModule CapsModule
@@ -808,6 +809,7 @@ namespace OpenSim.Region.Framework.Scenes
808 m_interregionCommsIn = RequestModuleInterface<IInterregionCommsIn>(); 809 m_interregionCommsIn = RequestModuleInterface<IInterregionCommsIn>();
809 m_dialogModule = RequestModuleInterface<IDialogModule>(); 810 m_dialogModule = RequestModuleInterface<IDialogModule>();
810 m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); 811 m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
812 m_teleportModule = RequestModuleInterface<ITeleportModule>();
811 } 813 }
812 814
813 #endregion 815 #endregion
@@ -2819,8 +2821,16 @@ namespace OpenSim.Region.Framework.Scenes
2819 2821
2820 if (sp != null) 2822 if (sp != null)
2821 { 2823 {
2822 m_sceneGridService.RequestTeleportToLocation(sp, regionHandle, 2824 if (m_teleportModule != null)
2823 position, lookAt, teleportFlags); 2825 {
2826 m_teleportModule.RequestTeleportToLocation(sp, regionHandle,
2827 position, lookAt, teleportFlags);
2828 }
2829 else
2830 {
2831 m_sceneGridService.RequestTeleportToLocation(sp, regionHandle,
2832 position, lookAt, teleportFlags);
2833 }
2824 } 2834 }
2825 } 2835 }
2826 2836
@@ -2841,17 +2851,7 @@ namespace OpenSim.Region.Framework.Scenes
2841 return; 2851 return;
2842 } 2852 }
2843 2853
2844 ScenePresence sp = null; 2854 RequestTeleportLocation(remoteClient, info.RegionHandle, position, Vector3.Zero, (uint)(TPFlags.SetLastToTarget | TPFlags.ViaLandmark));
2845 lock (m_scenePresences)
2846 {
2847 if (m_scenePresences.ContainsKey(remoteClient.AgentId))
2848 sp = m_scenePresences[remoteClient.AgentId];
2849 }
2850 if (sp != null)
2851 {
2852 m_sceneGridService.RequestTeleportToLocation(sp, info.RegionHandle,
2853 position, Vector3.Zero, (uint)(TPFlags.SetLastToTarget | TPFlags.ViaLandmark));
2854 }
2855 } 2855 }
2856 2856
2857 public void CrossAgentToNewRegion(ScenePresence agent, bool isFlying) 2857 public void CrossAgentToNewRegion(ScenePresence agent, bool isFlying)