aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authoronefang2019-05-19 22:28:19 +1000
committeronefang2019-05-19 22:28:19 +1000
commit30cc9a733f4e7013c82696985c8481be1a8aac1c (patch)
tree46b4ed8a7737f4b52ce5d89ea7dc52016ca3b7de /OpenSim/Region
parentWhite space -- (diff)
downloadopensim-SC_OLD-30cc9a733f4e7013c82696985c8481be1a8aac1c.zip
opensim-SC_OLD-30cc9a733f4e7013c82696985c8481be1a8aac1c.tar.gz
opensim-SC_OLD-30cc9a733f4e7013c82696985c8481be1a8aac1c.tar.bz2
opensim-SC_OLD-30cc9a733f4e7013c82696985c8481be1a8aac1c.tar.xz
Remove silly 4096 sim TP check for a client bug that was fixed long ago.
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs47
1 files changed, 0 insertions, 47 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index 2334e0b..9ce6201 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -54,15 +54,9 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 54 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
55 private static readonly string LogHeader = "[ENTITY TRANSFER MODULE]"; 55 private static readonly string LogHeader = "[ENTITY TRANSFER MODULE]";
56 56
57 public const int DefaultMaxTransferDistance = 4095;
58 public const bool WaitForAgentArrivedAtDestinationDefault = true; 57 public const bool WaitForAgentArrivedAtDestinationDefault = true;
59 58
60 /// <summary> 59 /// <summary>
61 /// The maximum distance, in standard region units (256m) that an agent is allowed to transfer.
62 /// </summary>
63 public int MaxTransferDistance { get; set; }
64
65 /// <summary>
66 /// If true then on a teleport, the source region waits for a callback from the destination region. If 60 /// If true then on a teleport, the source region waits for a callback from the destination region. If
67 /// a callback fails to arrive within a set time then the user is pulled back into the source region. 61 /// a callback fails to arrive within a set time then the user is pulled back into the source region.
68 /// </summary> 62 /// </summary>
@@ -226,12 +220,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
226 220
227 WaitForAgentArrivedAtDestination 221 WaitForAgentArrivedAtDestination
228 = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault); 222 = transferConfig.GetBoolean("wait_for_callback", WaitForAgentArrivedAtDestinationDefault);
229
230 MaxTransferDistance = transferConfig.GetInt("max_distance", DefaultMaxTransferDistance);
231 }
232 else
233 {
234 MaxTransferDistance = DefaultMaxTransferDistance;
235 } 223 }
236 224
237 m_entityTransferStateMachine = new EntityTransferStateMachine(this); 225 m_entityTransferStateMachine = new EntityTransferStateMachine(this);
@@ -639,29 +627,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
639 } 627 }
640 628
641 /// <summary> 629 /// <summary>
642 /// Determines whether this instance is within the max transfer distance.
643 /// </summary>
644 /// <param name="sourceRegion"></param>
645 /// <param name="destRegion"></param>
646 /// <returns>
647 /// <c>true</c> if this instance is within max transfer distance; otherwise, <c>false</c>.
648 /// </returns>
649 private bool IsWithinMaxTeleportDistance(RegionInfo sourceRegion, GridRegion destRegion)
650 {
651 if(MaxTransferDistance == 0)
652 return true;
653
654// m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Source co-ords are x={0} y={1}", curRegionX, curRegionY);
655//
656// m_log.DebugFormat("[ENTITY TRANSFER MODULE]: Final dest is x={0} y={1} {2}@{3}",
657// destRegionX, destRegionY, finalDestination.RegionID, finalDestination.ServerURI);
658
659 // Insanely, RegionLoc on RegionInfo is the 256m map co-ord whilst GridRegion.RegionLoc is the raw meters position.
660 return Math.Abs(sourceRegion.RegionLocX - destRegion.RegionCoordX) <= MaxTransferDistance
661 && Math.Abs(sourceRegion.RegionLocY - destRegion.RegionCoordY) <= MaxTransferDistance;
662 }
663
664 /// <summary>
665 /// Wraps DoTeleportInternal() and manages the transfer state. 630 /// Wraps DoTeleportInternal() and manages the transfer state.
666 /// </summary> 631 /// </summary>
667 public void DoTeleport( 632 public void DoTeleport(
@@ -721,18 +686,6 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
721 686
722 RegionInfo sourceRegion = sp.Scene.RegionInfo; 687 RegionInfo sourceRegion = sp.Scene.RegionInfo;
723 688
724 if (!IsWithinMaxTeleportDistance(sourceRegion, finalDestination))
725 {
726 sp.ControllingClient.SendTeleportFailed(
727 string.Format(
728 "Can't teleport to {0} ({1},{2}) from {3} ({4},{5}), destination is more than {6} regions way",
729 finalDestination.RegionName, finalDestination.RegionCoordX, finalDestination.RegionCoordY,
730 sourceRegion.RegionName, sourceRegion.RegionLocX, sourceRegion.RegionLocY,
731 MaxTransferDistance));
732
733 return;
734 }
735
736 ulong destinationHandle = finalDestination.RegionHandle; 689 ulong destinationHandle = finalDestination.RegionHandle;
737 690
738 // Let's do DNS resolution only once in this process, please! 691 // Let's do DNS resolution only once in this process, please!