Fix osTeleportAgent and osTeleportOwner for the case that GridService is used with a storage provider other than NullRegionData.
parent
2a40c8511a
commit
3b4af8a0dc
|
@ -698,21 +698,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
== World.LandChannel.GetLandObject(
|
== World.LandChannel.GetLandObject(
|
||||||
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
|
||||||
{
|
{
|
||||||
// Check for hostname , attempt to make a hglink
|
// Check for hostname, attempt to make a HG link,
|
||||||
// and convert the regionName to the target region
|
// and convert the regionName to the target region
|
||||||
if (regionName.Contains(".") && regionName.Contains(":"))
|
if (regionName.Contains(".") && regionName.Contains(":"))
|
||||||
{
|
{
|
||||||
List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
|
List<GridRegion> regions = World.GridService.GetRegionsByName(World.RegionInfo.ScopeID, regionName, 1);
|
||||||
// Try to link the region
|
string[] parts = regionName.Split(new char[] { ':' });
|
||||||
if (regions != null && regions.Count > 0)
|
if (parts.Length > 2)
|
||||||
{
|
regionName = parts[0] + ':' + parts[1] + "/ " + parts[2];
|
||||||
GridRegion regInfo = regions[0];
|
regionName = "http://" + regionName;
|
||||||
string[] parts = regInfo.RegionName.Split(new char[] { ':' });
|
|
||||||
if (parts.Length > 2)
|
|
||||||
regionName = parts[2];
|
|
||||||
else
|
|
||||||
regionName = parts[0];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
World.RequestTeleportLocation(presence.ControllingClient, regionName,
|
World.RequestTeleportLocation(presence.ControllingClient, regionName,
|
||||||
new Vector3((float)position.x, (float)position.y, (float)position.z),
|
new Vector3((float)position.x, (float)position.y, (float)position.z),
|
||||||
|
|
Loading…
Reference in New Issue