aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs17
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs1
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs5
3 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index c1c1eaf..a0f784e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -924,6 +924,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
924 } 924 }
925 925
926 // Teleport functions 926 // Teleport functions
927 public void osLocalTeleportAgent(LSL_Key agent, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Vector3 lookat, LSL_Integer flags)
928 {
929 UUID agentId;
930 if (!UUID.TryParse(agent, out agentId))
931 return;
932
933 ScenePresence presence = World.GetScenePresence(agentId);
934 if (presence == null || presence.IsDeleted || presence.IsInTransit)
935 return;
936
937 Vector3 pos = presence.AbsolutePosition;
938 if (!checkAllowAgentTPbyLandOwner(agentId, pos))
939 return;
940
941 World.RequestLocalTeleport(presence, position, velocity, lookat, flags);
942 }
943
927 public void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat) 944 public void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat)
928 { 945 {
929 // High because there is no security check. High griefer potential 946 // High because there is no security check. High griefer potential
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
index ce6aaf8..194df36 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs
@@ -150,6 +150,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
150 string osGetAgentIP(string agent); 150 string osGetAgentIP(string agent);
151 151
152 // Teleport commands 152 // Teleport commands
153 void osLocalTeleportAgent(LSL_Key agent, LSL_Types.Vector3 position, LSL_Types.Vector3 velocity, LSL_Types.Vector3 lookat, LSL_Integer flags);
153 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 154 void osTeleportAgent(string agent, string regionName, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
154 void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 155 void osTeleportAgent(string agent, int regionX, int regionY, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
155 void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat); 156 void osTeleportAgent(string agent, LSL_Types.Vector3 position, LSL_Types.Vector3 lookat);
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
index fd5142f..88ea9d5 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs
@@ -247,6 +247,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
247 247
248 // Teleport Functions 248 // Teleport Functions
249 249
250 public void osLocalTeleportAgent(LSL_Key agent, vector position, vector velocity, vector lookat, LSL_Integer flags)
251 {
252 m_OSSL_Functions.osLocalTeleportAgent(agent, position, velocity, lookat, flags);
253 }
254
250 public void osTeleportAgent(string agent, string regionName, vector position, vector lookat) 255 public void osTeleportAgent(string agent, string regionName, vector position, vector lookat)
251 { 256 {
252 m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat); 257 m_OSSL_Functions.osTeleportAgent(agent, regionName, position, lookat);