Mantis#1934. Thank you Tyre for a patch that:

This patch implements the LSL script function 
llTeleportAgentHome()
0.6.0-stable
Charles Krinke 2008-08-13 14:24:37 +00:00
parent 9d93668a0a
commit bf363c0ded
2 changed files with 22 additions and 2 deletions

View File

@ -3028,7 +3028,17 @@ namespace OpenSim.Region.ScriptEngine.Common
public void llTeleportAgentHome(string agent)
{
m_host.AddScriptLPS(1);
NotImplemented("llTeleportAgentHome");
LLUUID agentId = new LLUUID();
if (LLUUID.TryParse(agent, out agentId))
{
ScenePresence presence = World.GetScenePresence(agentId);
if (presence != null)
{
// agent must be over the owners land
if (m_host.OwnerID == World.GetLandOwner(presence.AbsolutePosition.X, presence.AbsolutePosition.Y))
World.TeleportClientHome(agentId, presence.ControllingClient);
}
}
}
public void llModifyLand(int action, int brush)

View File

@ -2943,7 +2943,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public void llTeleportAgentHome(string agent)
{
m_host.AddScriptLPS(1);
NotImplemented("llTeleportAgentHome");
LLUUID agentId = new LLUUID();
if (LLUUID.TryParse(agent, out agentId))
{
ScenePresence presence = World.GetScenePresence(agentId);
if (presence != null)
{
// agent must be over the owners land
if (m_host.OwnerID == World.GetLandOwner(presence.AbsolutePosition.X, presence.AbsolutePosition.Y))
World.TeleportClientHome(agentId, presence.ControllingClient);
}
}
}
public void llModifyLand(int action, int brush)