Add support for new naming syntax of linked regions to osTeleportAgent and osTeleportOwner.

This commit is contained in:
Marck
2011-01-21 20:00:04 +01:00
parent 47a5d8d742
commit 4f9c3c73ad
2 changed files with 5 additions and 18 deletions

View File

@@ -3770,15 +3770,15 @@ namespace OpenSim.Region.Framework.Scenes
public void RequestTeleportLocation(IClientAPI remoteClient, string regionName, Vector3 position,
Vector3 lookat, uint teleportFlags)
{
GridRegion regionInfo = GridService.GetRegionByName(UUID.Zero, regionName);
if (regionInfo == null)
List<GridRegion> regions = GridService.GetRegionsByName(RegionInfo.ScopeID, regionName, 1);
if (regions == null || regions.Count == 0)
{
// can't find the region: Tell viewer and abort
remoteClient.SendTeleportFailed("The region '" + regionName + "' could not be found.");
return;
}
RequestTeleportLocation(remoteClient, regionInfo.RegionHandle, position, lookat, teleportFlags);
RequestTeleportLocation(remoteClient, regions[0].RegionHandle, position, lookat, teleportFlags);
}
/// <summary>