aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs12
1 files changed, 8 insertions, 4 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 1a32510..b84c3d5 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3881,8 +3881,11 @@ namespace OpenSim.Region.Framework.Scenes
3881 } 3881 }
3882 3882
3883 /// <summary> 3883 /// <summary>
3884 /// Tries to teleport agent to other region. 3884 /// Tries to teleport agent to another region.
3885 /// </summary> 3885 /// </summary>
3886 /// <remarks>
3887 /// The region name must exactly match that given.
3888 /// </remarks>
3886 /// <param name="remoteClient"></param> 3889 /// <param name="remoteClient"></param>
3887 /// <param name="regionName"></param> 3890 /// <param name="regionName"></param>
3888 /// <param name="position"></param> 3891 /// <param name="position"></param>
@@ -3891,15 +3894,16 @@ namespace OpenSim.Region.Framework.Scenes
3891 public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, Vector3 position, 3894 public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, Vector3 position,
3892 Vector3 lookat, uint teleportFlags) 3895 Vector3 lookat, uint teleportFlags)
3893 { 3896 {
3894 List<GridRegion> regions = GridService.GetRegionsByName(RegionInfo.ScopeID, regionName, 1); 3897 GridRegion region = GridService.GetRegionByName(RegionInfo.ScopeID, regionName);
3895 if (regions == null || regions.Count == 0) 3898
3899 if (region == null)
3896 { 3900 {
3897 // can't find the region: Tell viewer and abort 3901 // can't find the region: Tell viewer and abort
3898 remoteClient.SendTeleportFailed("The region '" + regionName + "' could not be found."); 3902 remoteClient.SendTeleportFailed("The region '" + regionName + "' could not be found.");
3899 return; 3903 return;
3900 } 3904 }
3901 3905
3902 RequestTeleportLocation(remoteClient, regions[0].RegionHandle, position, lookat, teleportFlags); 3906 RequestTeleportLocation(remoteClient, region.RegionHandle, position, lookat, teleportFlags);
3903 } 3907 }
3904 3908
3905 /// <summary> 3909 /// <summary>