From bbbe9e73cca2a0ed5d35db1b054b8ed4cd23bfea Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 18 Jan 2010 09:14:19 -0800 Subject: * Fixed misspelling of field in GridService * Moved TeleportClientHome to EntityTransferModule --- .../Framework/Interfaces/IEntityTransferModule.cs | 3 +++ OpenSim/Region/Framework/Scenes/Scene.cs | 21 ++++++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs index a0505df..73c68f1 100644 --- a/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IEntityTransferModule.cs @@ -30,6 +30,7 @@ using OpenSim.Services.Interfaces; using GridRegion = OpenSim.Services.Interfaces.GridRegion; using OpenMetaverse; +using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.Framework.Interfaces @@ -39,6 +40,8 @@ namespace OpenSim.Region.Framework.Interfaces void Teleport(ScenePresence agent, ulong regionHandle, Vector3 position, Vector3 lookAt, uint teleportFlags); + void TeleportHome(UUID id, IClientAPI client); + void Cross(ScenePresence agent, bool isFlying); void AgentArrivedAtDestination(UUID agent); diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 5730b56..3cfb236 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2558,7 +2558,6 @@ namespace OpenSim.Region.Framework.Scenes { client.OnTeleportLocationRequest += RequestTeleportLocation; client.OnTeleportLandmarkRequest += RequestTeleportLandmark; - client.OnTeleportHomeRequest += TeleportClientHome; } public virtual void SubscribeToClientScriptEvents(IClientAPI client) @@ -2713,7 +2712,7 @@ namespace OpenSim.Region.Framework.Scenes { client.OnTeleportLocationRequest -= RequestTeleportLocation; client.OnTeleportLandmarkRequest -= RequestTeleportLandmark; - client.OnTeleportHomeRequest -= TeleportClientHome; + //client.OnTeleportHomeRequest -= TeleportClientHome; } public virtual void UnSubscribeToClientScriptEvents(IClientAPI client) @@ -2760,20 +2759,12 @@ namespace OpenSim.Region.Framework.Scenes /// The IClientAPI for the client public virtual void TeleportClientHome(UUID agentId, IClientAPI client) { - OpenSim.Services.Interfaces.PresenceInfo pinfo = PresenceService.GetAgent(client.SessionId); - - if (pinfo != null) + if (m_teleportModule != null) + m_teleportModule.TeleportHome(agentId, client); + else { - GridRegion regionInfo = GridService.GetRegionByUUID(UUID.Zero, pinfo.HomeRegionID); - if (regionInfo == null) - { - // can't find the Home region: Tell viewer and abort - client.SendTeleportFailed("Your home-region could not be found."); - return; - } - RequestTeleportLocation( - client, regionInfo.RegionHandle, pinfo.HomePosition, pinfo.HomeLookAt, - (uint)(TPFlags.SetLastToTarget | TPFlags.ViaHome)); + m_log.DebugFormat("[SCENE]: Unable to teleport user home: no AgentTransferModule is active"); + client.SendTeleportFailed("Unable to perform teleports on this simulator."); } } -- cgit v1.1