* Applying mantis#1048 - Patch for osSetRegionWaterHeight()

0.6.0-stable
Adam Frisby 2008-04-25 10:37:22 +00:00
parent 421730d972
commit 87e2793ca6
5 changed files with 20 additions and 3 deletions

View File

@ -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);

View File

@ -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)

View File

@ -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);
}
}

View File

@ -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);
}
}
}

View File

@ -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);
}
}