From 87e2793ca6672ddcfb54de9dd3c1e16008da5956 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 25 Apr 2008 10:37:22 +0000 Subject: * Applying mantis#1048 - Patch for osSetRegionWaterHeight() --- .../Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs | 6 ++++-- OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 12 ++++++++++++ .../ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs | 1 + OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs | 3 ++- .../ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs | 1 + 5 files changed, 20 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs index 7f41251..06e4bea 100644 --- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs @@ -111,7 +111,6 @@ namespace OpenSim.Region.ScriptEngine.Common } - public void Start(BuilIn_Commands LSL_Functions) { m_LSL_Functions = LSL_Functions; @@ -159,7 +158,10 @@ namespace OpenSim.Region.ScriptEngine.Common { return m_LSL_Functions.llSin(f); } - + public void osSetRegionWaterHeight(double height) + { + m_LSL_Functions.osSetRegionWaterHeight(height); + } public double llCos(double f) { return m_LSL_Functions.llCos(f); diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 79b13cf..2b09bea 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs @@ -166,6 +166,18 @@ namespace OpenSim.Region.ScriptEngine.Common return LLUUID.Zero; } + public void osSetRegionWaterHeight(double height) + { + m_host.AddScriptLPS(1); + //Check to make sure that the script's owner is the estate manager/master + //World.PermissionsMngr.GenericEstatePermission( + if (World.PermissionsMngr.GenericEstatePermission(m_host.OwnerID)) + { + World.EstateManager.setRegionSettings((float)height, 0f, 0f, false, 0.5f); + World.EstateManager.sendRegionInfoPacketToAll(); + } + } + //These are the implementations of the various ll-functions used by the LSL scripts. //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 public double llSin(double f) diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs index a74340b..43ca5fd 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs @@ -639,5 +639,6 @@ namespace OpenSim.Region.ScriptEngine.Common string llStringTrim(string src, int type); LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args); + void osSetRegionWaterHeight(double height); } } diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs index e403a12..e5c2173 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands.cs @@ -268,7 +268,7 @@ namespace OpenSim.Region.ScriptEngine.Common return 0; } } - + public double osTerrainGetHeight(int x, int y) { m_host.AddScriptLPS(1); @@ -530,5 +530,6 @@ namespace OpenSim.Region.ScriptEngine.Common { m_host.setScriptEvents(m_itemID, events); } + } } diff --git a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs index a4dd3b0..2d58b57 100644 --- a/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs +++ b/OpenSim/Region/ScriptEngine/Common/OSSL_BuilIn_Commands_Interface.cs @@ -61,5 +61,6 @@ namespace OpenSim.Region.ScriptEngine.Common string osSetPenColour(string drawList, string colour); string osDrawImage(string drawList, int width, int height, string imageUrl); void osSetStateEvents(int events); + } } -- cgit v1.1