diff options
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.cs | 26 |
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) |