aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorUbitUmarov2019-11-18 20:17:48 +0000
committerUbitUmarov2019-11-18 20:17:48 +0000
commit0cf3ec553a79b05adf82b81fc71979a0636da32d (patch)
tree7386dc4cece4ab5334e182fa46bb0ae0c0842685
parentYengine: more on constants operations reduction (diff)
downloadopensim-SC-0cf3ec553a79b05adf82b81fc71979a0636da32d.zip
opensim-SC-0cf3ec553a79b05adf82b81fc71979a0636da32d.tar.gz
opensim-SC-0cf3ec553a79b05adf82b81fc71979a0636da32d.tar.bz2
opensim-SC-0cf3ec553a79b05adf82b81fc71979a0636da32d.tar.xz
fix the block of teleport to same region handle
-rw-r--r--OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs17
1 files changed, 7 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
index c55f535..07b2a8e 100644
--- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
@@ -559,22 +559,13 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
559 559
560 if (finalDestination == null) 560 if (finalDestination == null)
561 { 561 {
562 m_log.WarnFormat( "{0} Final destination is having problems. Unable to teleport {1} {2}: {3}", 562 m_log.WarnFormat( "{0} Unable to teleport {1} {2}: {3}",
563 LogHeader, sp.Name, sp.UUID, reason); 563 LogHeader, sp.Name, sp.UUID, reason);
564 564
565 sp.ControllingClient.SendTeleportFailed(reason); 565 sp.ControllingClient.SendTeleportFailed(reason);
566 return; 566 return;
567 } 567 }
568 568
569 // Check that these are not the same coordinates
570 if (finalDestination.RegionLocX == sp.Scene.RegionInfo.RegionLocX &&
571 finalDestination.RegionLocY == sp.Scene.RegionInfo.RegionLocY)
572 {
573 // Can't do. Viewer crashes
574 sp.ControllingClient.SendTeleportFailed("Space warp! You would crash. Move to a different region and try again.");
575 return;
576 }
577
578 if (!ValidateGenericConditions(sp, reg, finalDestination, teleportFlags, out reason)) 569 if (!ValidateGenericConditions(sp, reg, finalDestination, teleportFlags, out reason))
579 { 570 {
580 sp.ControllingClient.SendTeleportFailed(reason); 571 sp.ControllingClient.SendTeleportFailed(reason);
@@ -691,6 +682,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer
691 682
692 ulong destinationHandle = finalDestination.RegionHandle; 683 ulong destinationHandle = finalDestination.RegionHandle;
693 684
685 if(destinationHandle == sourceRegion.RegionHandle)
686 {
687 sp.ControllingClient.SendTeleportFailed("Can't teleport to a region on same map position. Try going other region first, then retry");
688 return;
689 }
690
694 // Let's do DNS resolution only once in this process, please! 691 // Let's do DNS resolution only once in this process, please!
695 // This may be a costly operation. The reg.ExternalEndPoint field is not a passive field, 692 // This may be a costly operation. The reg.ExternalEndPoint field is not a passive field,
696 // it's actually doing a lot of work. 693 // it's actually doing a lot of work.