aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Interfaces/ITeleportModule.cs14
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs26
2 files changed, 27 insertions, 13 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/ITeleportModule.cs b/OpenSim/Region/Framework/Interfaces/ITeleportModule.cs
new file mode 100644
index 0000000..5365094
--- /dev/null
+++ b/OpenSim/Region/Framework/Interfaces/ITeleportModule.cs
@@ -0,0 +1,14 @@
1using System;
2using System.Collections.Generic;
3using System.Text;
4using OpenMetaverse;
5using OpenSim.Region.Framework.Scenes;
6
7namespace OpenSim.Region.Framework.Interfaces
8{
9 public interface ITeleportModule
10 {
11 void RequestTeleportToLocation(ScenePresence avatar, ulong regionHandle, Vector3 position,
12 Vector3 lookAt, uint teleportFlags);
13 }
14}
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)