Thanks BlueWall for a patch that adds Hypergrid dynamic linking to osTeleportAgent. Fixes mantis #3408.

0.6.5-rc1
diva 2009-04-05 16:41:27 +00:00
parent e7d4ea134e
commit 75873b6253
2 changed files with 21 additions and 0 deletions

View File

@ -38,6 +38,7 @@ using OpenSim.Framework;
using OpenSim.Framework.Console; using OpenSim.Framework.Console;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.Framework.Scenes.Hypergrid;
using OpenSim.Region.ScriptEngine.Shared; using OpenSim.Region.ScriptEngine.Shared;
using OpenSim.Region.ScriptEngine.Shared.Api.Plugins; using OpenSim.Region.ScriptEngine.Shared.Api.Plugins;
using OpenSim.Region.ScriptEngine.Shared.ScriptBase; using OpenSim.Region.ScriptEngine.Shared.ScriptBase;
@ -506,6 +507,25 @@ 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
// and convert the regionName to the target region
if ( regionName.Contains(".") && regionName.Contains(":"))
{
// Try to link the region
RegionInfo regInfo = HGHyperlink.TryLinkRegion(World,
presence.ControllingClient,
regionName);
// Get the region name
if (regInfo != null)
{
regionName = regInfo.RegionName;
}
else
{
// Might need to ping the client here in case of failure??
}
}
presence.ControllingClient.SendTeleportLocationStart(); presence.ControllingClient.SendTeleportLocationStart();
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),

View File

@ -707,6 +707,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
} }
catch (Exception e) catch (Exception e)
{ {
m_log.DebugFormat("[Script] Exception: {0}", e.Message);
m_InEvent = false; m_InEvent = false;
m_CurrentEvent = String.Empty; m_CurrentEvent = String.Empty;