aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorMelanie2012-02-28 20:48:31 +0100
committerMelanie2012-02-28 20:48:31 +0100
commit0fb50a8a9edbd5a0eda6eb05d5246b16a8bc4eb2 (patch)
treea5650ffc4ec5d34c49f9cfa1c540ac1cc8912fe0 /OpenSim/Region/ScriptEngine
parent made box a little larger (diff)
downloadopensim-SC_OLD-0fb50a8a9edbd5a0eda6eb05d5246b16a8bc4eb2.zip
opensim-SC_OLD-0fb50a8a9edbd5a0eda6eb05d5246b16a8bc4eb2.tar.gz
opensim-SC_OLD-0fb50a8a9edbd5a0eda6eb05d5246b16a8bc4eb2.tar.bz2
opensim-SC_OLD-0fb50a8a9edbd5a0eda6eb05d5246b16a8bc4eb2.tar.xz
Implement llTeleportAgent
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-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>();