From c0c153d09340c117aea2f06ecbdd288ee017bd8e Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 23 Feb 2013 07:23:24 +1000 Subject: No, we don't need to enshrine viewer bugs in the server, we need to fix the viewer, which is half done. --- .../EntityTransfer/EntityTransferModule.cs | 46 ---------------------- 1 file changed, 46 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 3cb1901..c43edd2 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -52,15 +52,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public const int DefaultMaxTransferDistance = 4095; public const bool WaitForAgentArrivedAtDestinationDefault = true; /// - /// The maximum distance, in standard region units (256m) that an agent is allowed to transfer. - /// - public int MaxTransferDistance { get; set; } - - /// /// If true then on a teleport, the source region waits for a callback from the destination region. If /// a callback fails to arrive within a set time then the user is pulled back into the source region. /// @@ -118,12 +112,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer { WaitForAgentArrivedAtDestination = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault); - - MaxTransferDistance = transferConfig.GetInt("max_distance", DefaultMaxTransferDistance); - } - else - { - MaxTransferDistance = DefaultMaxTransferDistance; } m_entityTransferStateMachine = new EntityTransferStateMachine(this); @@ -371,26 +359,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer return true; } - /// - /// Determines whether this instance is within the max transfer distance. - /// - /// - /// - /// - /// true if this instance is within max transfer distance; otherwise, false. - /// - private bool IsWithinMaxTeleportDistance(RegionInfo sourceRegion, GridRegion destRegion) - { -// m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Source co-ords are x={0} y={1}", curRegionX, curRegionY); -// -// m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final dest is x={0} y={1} {2}@{3}", -// destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI); - - // Insanely, RegionLoc on RegionInfo is the 256m map co-ord whilst GridRegion.RegionLoc is the raw meters position. - return Math.Abs(sourceRegion.RegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance - && Math.Abs(sourceRegion.RegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance; - } - public void DoTeleport( ScenePresence sp, GridRegion reg, GridRegion finalDestination, Vector3 position, Vector3 lookAt, uint teleportFlags) @@ -421,20 +389,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer RegionInfo sourceRegion = sp.Scene.RegionInfo; - if (!IsWithinMaxTeleportDistance(sourceRegion, finalDestination)) - { - sp.ControllingClient.SendTeleportFailed( - string.Format( - "Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way", - finalDestination.RegionName, finalDestination.RegionCoordX, finalDestination.RegionCoordY, - sourceRegion.RegionName, sourceRegion.RegionLocX, sourceRegion.RegionLocY, - MaxTransferDistance)); - - m_entityTransferStateMachine.ResetFromTransit(sp.UUID); - - return; - } - uint newRegionX = (uint)(reg.RegionHandle >> 40); uint newRegionY = (((uint)(reg.RegionHandle)) >> 8); uint oldRegionX = (uint)(sp.Scene.RegionInfo.RegionHandle >> 40); -- cgit v1.1