From 7f0995ae318292ffc33da6f20bca767e61849408 Mon Sep 17 00:00:00 2001 From: Freaky Tech Date: Mon, 2 Mar 2015 20:52:21 +0100 Subject: [PATCH] added llGetEnv() implementation Signed-off-by: BlueWall --- .../Shared/Api/Implementation/LSL_Api.cs | 39 ++++++++++++++++--- .../Shared/Api/Interface/ILSL_Api.cs | 1 + .../Shared/Api/Runtime/LSL_Stub.cs | 5 +++ 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 41b18d6c11..2149f2b959 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5620,6 +5620,39 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api return new LSL_Vector(World.RegionInfo.WorldLocX, World.RegionInfo.WorldLocY, 0); } + public LSL_String llGetEnv(LSL_String name) + { + m_host.AddScriptLPS(1); + if (name == "dynamic_pathfinding") + { + return "0"; + } + else if (name == "estate_id") + { + return World.RegionInfo.EstateSettings.EstateID.ToString(); + } + else if (name == "frame_number") + { + return World.Frame.ToString(); + } + else if (name == "region_idle") + { + return "0"; + } + else if (name == "sim_channel") + { + return "OpenSim"; + } + else if (name == "sim_version") + { + return ""; + } + else + { + return ""; + } + } + /// /// Insert the list identified by into the /// list designated by such that the first @@ -12324,12 +12357,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api // them from this region as they are completed // - public void llGetEnv(LSL_String name) - { - m_host.AddScriptLPS(1); - NotImplemented("llGetEnv"); - } - public void llSetSoundQueueing(int queue) { m_host.AddScriptLPS(1); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs index 18a1e846bc..3d58573420 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/ILSL_Api.cs @@ -124,6 +124,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces LSL_String llGetCreator(); LSL_String llGetDate(); LSL_Float llGetEnergy(); + LSL_String llGetEnv(LSL_String name); LSL_Vector llGetForce(); LSL_Integer llGetFreeMemory(); LSL_Integer llGetFreeURLs(); diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs index 49e39fec6f..35aaf01cc4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Stub.cs @@ -464,6 +464,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase return m_LSL_Functions.llGetEnergy(); } + public LSL_String llGetEnv(LSL_String name) + { + return m_LSL_Functions.llGetEnv(name); + } + public LSL_Vector llGetForce() { return m_LSL_Functions.llGetForce();