aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
authorCharles Krinke2008-08-13 14:24:37 +0000
committerCharles Krinke2008-08-13 14:24:37 +0000
commitbf363c0ded9d99a929bb4d9ca3b3d2d8a92b7ede (patch)
tree02d84d781ec06c305984b8ac94dffbf29d39c2eb /OpenSim/Region/ScriptEngine/Shared/Api
parentmantis#1927. Thank you kindly, Leaf for a patch that: (diff)
downloadopensim-SC_OLD-bf363c0ded9d99a929bb4d9ca3b3d2d8a92b7ede.zip
opensim-SC_OLD-bf363c0ded9d99a929bb4d9ca3b3d2d8a92b7ede.tar.gz
opensim-SC_OLD-bf363c0ded9d99a929bb4d9ca3b3d2d8a92b7ede.tar.bz2
opensim-SC_OLD-bf363c0ded9d99a929bb4d9ca3b3d2d8a92b7ede.tar.xz
Mantis#1934. Thank you Tyre for a patch that:
This patch implements the LSL script function llTeleportAgentHome()
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs12
1 files changed, 11 insertions, 1 deletions
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
2943 public void llTeleportAgentHome(string agent) 2943 public void llTeleportAgentHome(string agent)
2944 { 2944 {
2945 m_host.AddScriptLPS(1); 2945 m_host.AddScriptLPS(1);
2946 NotImplemented("llTeleportAgentHome"); 2946 LLUUID agentId = new LLUUID();
2947 if (LLUUID.TryParse(agent, out agentId))
2948 {
2949 ScenePresence presence = World.GetScenePresence(agentId);
2950 if (presence != null)
2951 {
2952 // agent must be over the owners land
2953 if (m_host.OwnerID == World.GetLandOwner(presence.AbsolutePosition.X, presence.AbsolutePosition.Y))
2954 World.TeleportClientHome(agentId, presence.ControllingClient);
2955 }
2956 }
2947 } 2957 }
2948 2958
2949 public void llModifyLand(int action, int brush) 2959 public void llModifyLand(int action, int brush)