Mantis#1934. Thank you Tyre for a patch that:
This patch implements the LSL script function llTeleportAgentHome()0.6.0-stable
parent
9d93668a0a
commit
bf363c0ded
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue