diff options
author | Marck | 2010-12-20 01:36:39 +0100 |
---|---|---|
committer | Marck | 2010-12-20 02:09:35 +0100 |
commit | 3b4af8a0dc30e65b6f5c12d9f312f83be7ed240d (patch) | |
tree | 33a619d97f10d76a4aa815b4a325a9364acebc1f /OpenSim | |
parent | Make long help text for new link-region command syntax more explicit. (diff) | |
download | opensim-SC-3b4af8a0dc30e65b6f5c12d9f312f83be7ed240d.zip opensim-SC-3b4af8a0dc30e65b6f5c12d9f312f83be7ed240d.tar.gz opensim-SC-3b4af8a0dc30e65b6f5c12d9f312f83be7ed240d.tar.bz2 opensim-SC-3b4af8a0dc30e65b6f5c12d9f312f83be7ed240d.tar.xz |
Fix osTeleportAgent and osTeleportOwner for the case that GridService is used with a storage provider other than NullRegionData.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 5a796b8..bca08fb 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -698,21 +698,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
698 | == World.LandChannel.GetLandObject( | 698 | == World.LandChannel.GetLandObject( |
699 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) | 699 | presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID) |
700 | { | 700 | { |
701 | // Check for hostname , attempt to make a hglink | 701 | // Check for hostname, attempt to make a HG link, |
702 | // and convert the regionName to the target region | 702 | // and convert the regionName to the target region |
703 | if (regionName.Contains(".") && regionName.Contains(":")) | 703 | if (regionName.Contains(".") && regionName.Contains(":")) |
704 | { | 704 | { |
705 | List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); | 705 | List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1); |
706 | // Try to link the region | 706 | string[] parts = regionName.Split(new char[] { ':' }); |
707 | if (regions != null && regions.Count > 0) | 707 | if (parts.Length > 2) |
708 | { | 708 | regionName = parts[0] + ':' + parts[1] + "/ " + parts[2]; |
709 | GridRegion regInfo = regions[0]; | 709 | regionName = "http://" + regionName; |
710 | string[] parts = regInfo.RegionName.Split(new char[] { ':' }); | ||
711 | if (parts.Length > 2) | ||
712 | regionName = parts[2]; | ||
713 | else | ||
714 | regionName = parts[0]; | ||
715 | } | ||
716 | } | 710 | } |
717 | World.RequestTeleportLocation(presence.ControllingClient, regionName, | 711 | World.RequestTeleportLocation(presence.ControllingClient, regionName, |
718 | new Vector3((float)position.x, (float)position.y, (float)position.z), | 712 | new Vector3((float)position.x, (float)position.y, (float)position.z), |