aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs22
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index e9f9c2d..78c0d3c 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -4657,6 +4657,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
4657 ScriptSleep(5000); 4657 ScriptSleep(5000);
4658 } 4658 }
4659 4659
4660 public void llTeleportAgentHome(string agent, string simname, LSL_Vector pos, LSL_Vector lookAt)
4661 {
4662 m_host.AddScriptLPS(1);
4663 UUID agentId = new UUID();
4664 if (UUID.TryParse(agent, out agentId))
4665 {
4666 ScenePresence presence = World.GetScenePresence(agentId);
4667 if (presence != null)
4668 {
4669 // agent must not be a god
4670 if (presence.UserLevel >= 200) return;
4671
4672 // agent must be over the owners land
4673 if (m_host.OwnerID == World.LandChannel.GetLandObject(
4674 presence.AbsolutePosition.X, presence.AbsolutePosition.Y).LandData.OwnerID)
4675 {
4676 World.RequestTeleportLocation(presence.ControllingClient, simname, new Vector3((float)pos.x, (float)pos.y, (float)pos.z), new Vector3((float)lookAt.x, (float)lookAt.y, (float)lookAt.z), (uint)TeleportFlags.ViaLocation);
4677 }
4678 }
4679 }
4680 }
4681
4660 public void llTextBox(string agent, string message, int chatChannel) 4682 public void llTextBox(string agent, string message, int chatChannel)
4661 { 4683 {
4662 IDialogModule dm = World.RequestModuleInterface<IDialogModule>(); 4684 IDialogModule dm = World.RequestModuleInterface<IDialogModule>();