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 --- OpenSim/Region/Framework/Scenes/Scene.cs | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') 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