diff options
author | Adam Frisby | 2008-04-25 10:37:22 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-25 10:37:22 +0000 |
commit | 87e2793ca6672ddcfb54de9dd3c1e16008da5956 (patch) | |
tree | a7870b0c79e4f948262d9c39545d4a86e8b7ad8e /OpenSim/Region/ScriptEngine | |
parent | * Used thomas' patch m884 as an example to make HUD attachments work. While... (diff) | |
download | opensim-SC-87e2793ca6672ddcfb54de9dd3c1e16008da5956.zip opensim-SC-87e2793ca6672ddcfb54de9dd3c1e16008da5956.tar.gz opensim-SC-87e2793ca6672ddcfb54de9dd3c1e16008da5956.tar.bz2 opensim-SC-87e2793ca6672ddcfb54de9dd3c1e16008da5956.tar.xz |
* Applying mantis#1048 - Patch for osSetRegionWaterHeight()
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
5 files changed, 20 insertions, 3 deletions
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 | |||
111 | 111 | ||
112 | } | 112 | } |
113 | 113 | ||
114 | |||
115 | public void Start(BuilIn_Commands LSL_Functions) | 114 | public void Start(BuilIn_Commands LSL_Functions) |
116 | { | 115 | { |
117 | m_LSL_Functions = LSL_Functions; | 116 | m_LSL_Functions = LSL_Functions; |
@@ -159,7 +158,10 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
159 | { | 158 | { |
160 | return m_LSL_Functions.llSin(f); | 159 | return m_LSL_Functions.llSin(f); |
161 | } | 160 | } |
162 | 161 | public void osSetRegionWaterHeight(double height) | |
162 | { | ||
163 | m_LSL_Functions.osSetRegionWaterHeight(height); | ||
164 | } | ||
163 | public double llCos(double f) | 165 | public double llCos(double f) |
164 | { | 166 | { |
165 | return m_LSL_Functions.llCos(f); | 167 | 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 | |||
166 | return LLUUID.Zero; | 166 | return LLUUID.Zero; |
167 | } | 167 | } |
168 | 168 | ||
169 | public void osSetRegionWaterHeight(double height) | ||
170 | { | ||
171 | m_host.AddScriptLPS(1); | ||
172 | //Check to make sure that the script's owner is the estate manager/master | ||
173 | //World.PermissionsMngr.GenericEstatePermission( | ||
174 | if (World.PermissionsMngr.GenericEstatePermission(m_host.OwnerID)) | ||
175 | { | ||
176 | World.EstateManager.setRegionSettings((float)height, 0f, 0f, false, 0.5f); | ||
177 | World.EstateManager.sendRegionInfoPacketToAll(); | ||
178 | } | ||
179 | } | ||
180 | |||
169 | //These are the implementations of the various ll-functions used by the LSL scripts. | 181 | //These are the implementations of the various ll-functions used by the LSL scripts. |
170 | //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 | 182 | //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 |
171 | public double llSin(double f) | 183 | 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 | |||
639 | string llStringTrim(string src, int type); | 639 | string llStringTrim(string src, int type); |
640 | LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args); | 640 | LSL_Types.list llGetObjectDetails(string id, LSL_Types.list args); |
641 | 641 | ||
642 | void osSetRegionWaterHeight(double height); | ||
642 | } | 643 | } |
643 | } | 644 | } |
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 | |||
268 | return 0; | 268 | return 0; |
269 | } | 269 | } |
270 | } | 270 | } |
271 | 271 | ||
272 | public double osTerrainGetHeight(int x, int y) | 272 | public double osTerrainGetHeight(int x, int y) |
273 | { | 273 | { |
274 | m_host.AddScriptLPS(1); | 274 | m_host.AddScriptLPS(1); |
@@ -530,5 +530,6 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
530 | { | 530 | { |
531 | m_host.setScriptEvents(m_itemID, events); | 531 | m_host.setScriptEvents(m_itemID, events); |
532 | } | 532 | } |
533 | |||
533 | } | 534 | } |
534 | } | 535 | } |
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 | |||
61 | string osSetPenColour(string drawList, string colour); | 61 | string osSetPenColour(string drawList, string colour); |
62 | string osDrawImage(string drawList, int width, int height, string imageUrl); | 62 | string osDrawImage(string drawList, int width, int height, string imageUrl); |
63 | void osSetStateEvents(int events); | 63 | void osSetStateEvents(int events); |
64 | |||
64 | } | 65 | } |
65 | } | 66 | } |