aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs7
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs55
2 files changed, 58 insertions, 4 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index c38a52e..078a22a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -10367,7 +10367,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10367 ret.Add(new LSL_Integer(av.RunningScriptCount() * 16384)); 10367 ret.Add(new LSL_Integer(av.RunningScriptCount() * 16384));
10368 break; 10368 break;
10369 case ScriptBaseClass.OBJECT_SCRIPT_TIME: 10369 case ScriptBaseClass.OBJECT_SCRIPT_TIME:
10370 ret.Add(new LSL_Float(0)); 10370 ret.Add(new LSL_Float(av.ScriptExecutionTime() / 1000.0f));
10371 break; 10371 break;
10372 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE: 10372 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
10373 ret.Add(new LSL_Integer(1)); 10373 ret.Add(new LSL_Integer(1));
@@ -10435,9 +10435,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10435 ret.Add(new LSL_Integer(obj.ParentGroup.RunningScriptCount() * 16384)); 10435 ret.Add(new LSL_Integer(obj.ParentGroup.RunningScriptCount() * 16384));
10436 break; 10436 break;
10437 case ScriptBaseClass.OBJECT_SCRIPT_TIME: 10437 case ScriptBaseClass.OBJECT_SCRIPT_TIME:
10438 // Average cpu time per simulator frame expended on all scripts in the object 10438 // Average cpu time in seconds per simulator frame expended on all scripts in the object
10439 // Not currently available at Object level 10439 ret.Add(new LSL_Float(obj.ParentGroup.ScriptExecutionTime() / 1000.0f));
10440 ret.Add(new LSL_Float(0));
10441 break; 10440 break;
10442 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE: 10441 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
10443 // according to the SL wiki A prim or linkset will have prim 10442 // according to the SL wiki A prim or linkset will have prim
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index 2c0de93..72c1bf6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -3038,5 +3038,60 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
3038 3038
3039 return ScriptBaseClass.TRUE; 3039 return ScriptBaseClass.TRUE;
3040 } 3040 }
3041
3042 /// <summary>
3043 /// Sets terrain estate texture
3044 /// </summary>
3045 /// <param name="level"></param>
3046 /// <param name="texture"></param>
3047 /// <returns></returns>
3048 public void osSetTerrainTexture(int level, LSL_Key texture)
3049 {
3050 CheckThreatLevel(ThreatLevel.High, "osSetTerrainTexture");
3051
3052 m_host.AddScriptLPS(1);
3053 //Check to make sure that the script's owner is the estate manager/master
3054 //World.Permissions.GenericEstatePermission(
3055 if (World.Permissions.IsGod(m_host.OwnerID))
3056 {
3057 if (level < 0 || level > 3)
3058 return;
3059
3060 UUID textureID = new UUID();
3061 if (!UUID.TryParse(texture, out textureID))
3062 return;
3063
3064 // estate module is required
3065 IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
3066 if (estate != null)
3067 estate.setEstateTerrainBaseTexture(level, textureID);
3068 }
3069 }
3070
3071 /// <summary>
3072 /// Sets terrain heights of estate
3073 /// </summary>
3074 /// <param name="corner"></param>
3075 /// <param name="low"></param>
3076 /// <param name="high"></param>
3077 /// <returns></returns>
3078 public void osSetTerrainTextureHeight(int corner, double low, double high)
3079 {
3080 CheckThreatLevel(ThreatLevel.High, "osSetTerrainTextureHeight");
3081
3082 m_host.AddScriptLPS(1);
3083 //Check to make sure that the script's owner is the estate manager/master
3084 //World.Permissions.GenericEstatePermission(
3085 if (World.Permissions.IsGod(m_host.OwnerID))
3086 {
3087 if (corner < 0 || corner > 3)
3088 return;
3089
3090 // estate module is required
3091 IEstateModule estate = World.RequestModuleInterface<IEstateModule>();
3092 if (estate != null)
3093 estate.setEstateTerrainTextureHeights(corner, (float)low, (float)high);
3094 }
3095 }
3041 } 3096 }
3042} \ No newline at end of file 3097} \ No newline at end of file