From bf363c0ded9d99a929bb4d9ca3b3d2d8a92b7ede Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Wed, 13 Aug 2008 14:24:37 +0000 Subject: Mantis#1934. Thank you Tyre for a patch that: This patch implements the LSL script function llTeleportAgentHome() --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index a8f87b7..0cd5954 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -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) -- cgit v1.1