aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared
diff options
context:
space:
mode:
authorMelanie2012-04-09 21:40:03 +0100
committerMelanie2012-04-09 21:40:03 +0100
commit67d4f1d66cef2ff51453f113bdaef375004b17c9 (patch)
tree975abcb48e2492950ea974567379de88809f57f5 /OpenSim/Region/ScriptEngine/Shared
parentMerge branch 'master' into careminster (diff)
parentMantis5502 implementation of some of the new constants (diff)
downloadopensim-SC-67d4f1d66cef2ff51453f113bdaef375004b17c9.zip
opensim-SC-67d4f1d66cef2ff51453f113bdaef375004b17c9.tar.gz
opensim-SC-67d4f1d66cef2ff51453f113bdaef375004b17c9.tar.bz2
opensim-SC-67d4f1d66cef2ff51453f113bdaef375004b17c9.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Interfaces/IScriptModule.cs OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs42
1 files changed, 24 insertions, 18 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 7cf284d..a95dd63 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -11175,19 +11175,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11175 break; 11175 break;
11176 // For the following 8 see the Object version below 11176 // For the following 8 see the Object version below
11177 case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT: 11177 case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT:
11178 ret.Add(new LSL_Integer(0)); 11178 ret.Add(new LSL_Integer(av.RunningScriptCount()));
11179 break; 11179 break;
11180 case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT: 11180 case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT:
11181 ret.Add(new LSL_Integer(0)); 11181 ret.Add(new LSL_Integer(av.ScriptCount()));
11182 break; 11182 break;
11183 case ScriptBaseClass.OBJECT_SCRIPT_MEMORY: 11183 case ScriptBaseClass.OBJECT_SCRIPT_MEMORY:
11184 ret.Add(new LSL_Integer(0)); 11184 ret.Add(new LSL_Integer(av.RunningScriptCount() * 16384));
11185 break; 11185 break;
11186 case ScriptBaseClass.OBJECT_SCRIPT_TIME: 11186 case ScriptBaseClass.OBJECT_SCRIPT_TIME:
11187 ret.Add(new LSL_Float(0)); 11187 ret.Add(new LSL_Float(0));
11188 break; 11188 break;
11189 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE: 11189 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
11190 ret.Add(new LSL_Integer(0)); 11190 ret.Add(new LSL_Integer(1));
11191 break; 11191 break;
11192 case ScriptBaseClass.OBJECT_SERVER_COST: 11192 case ScriptBaseClass.OBJECT_SERVER_COST:
11193 ret.Add(new LSL_Float(0)); 11193 ret.Add(new LSL_Float(0));
@@ -11239,24 +11239,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11239 case ScriptBaseClass.OBJECT_CREATOR: 11239 case ScriptBaseClass.OBJECT_CREATOR:
11240 ret.Add(new LSL_String(obj.CreatorID.ToString())); 11240 ret.Add(new LSL_String(obj.CreatorID.ToString()));
11241 break; 11241 break;
11242 // The following 8 I have intentionaly coded to return zero. They are part of
11243 // "Land Impact" calculations. These calculations are probably not applicable
11244 // to OpenSim, required figures (cpu/memory usage) are not currently tracked
11245 // I have intentionally left these all at zero rather than return possibly
11246 // missleading numbers
11247 case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT: 11242 case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT:
11248 // in SL this currently includes crashed scripts 11243 ret.Add(new LSL_Integer(obj.ParentGroup.RunningScriptCount()));
11249 ret.Add(new LSL_Integer(0));
11250 break; 11244 break;
11251 case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT: 11245 case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT:
11252 ret.Add(new LSL_Integer(0)); 11246 ret.Add(new LSL_Integer(obj.ParentGroup.ScriptCount()));
11253 break; 11247 break;
11254 case ScriptBaseClass.OBJECT_SCRIPT_MEMORY: 11248 case ScriptBaseClass.OBJECT_SCRIPT_MEMORY:
11255 // The value returned in SL for mono scripts is 65536 * number of active scripts 11249 // The value returned in SL for mono scripts is 65536 * number of active scripts
11256 ret.Add(new LSL_Integer(0)); 11250 // and 16384 * number of active scripts for LSO. since llGetFreememory
11251 // is coded to give the LSO value use it here
11252 ret.Add(new LSL_Integer(obj.ParentGroup.RunningScriptCount() * 16384));
11257 break; 11253 break;
11258 case ScriptBaseClass.OBJECT_SCRIPT_TIME: 11254 case ScriptBaseClass.OBJECT_SCRIPT_TIME:
11259 // Average cpu time per simulator frame expended on all scripts in the objetc 11255 // Average cpu time per simulator frame expended on all scripts in the object
11256 // Not currently available at Object level
11260 ret.Add(new LSL_Float(0)); 11257 ret.Add(new LSL_Float(0));
11261 break; 11258 break;
11262 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE: 11259 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
@@ -11264,18 +11261,27 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
11264 // equivalent of the number of prims in a linkset if it does not 11261 // equivalent of the number of prims in a linkset if it does not
11265 // contain a mesh anywhere in the link set or is not a normal prim 11262 // contain a mesh anywhere in the link set or is not a normal prim
11266 // The value returned in SL for normal prims is prim count 11263 // The value returned in SL for normal prims is prim count
11267 ret.Add(new LSL_Integer(0)); 11264 ret.Add(new LSL_Integer(obj.ParentGroup.PrimCount));
11268 break; 11265 break;
11266 // The following 3 costs I have intentionaly coded to return zero. They are part of
11267 // "Land Impact" calculations. These calculations are probably not applicable
11268 // to OpenSim and are not yet complete in SL
11269 case ScriptBaseClass.OBJECT_SERVER_COST: 11269 case ScriptBaseClass.OBJECT_SERVER_COST:
11270 // The value returned in SL for normal prims is prim count 11270 // The linden calculation is here
11271 // http://wiki.secondlife.com/wiki/Mesh/Mesh_Server_Weight
11272 // The value returned in SL for normal prims looks like the prim count
11271 ret.Add(new LSL_Float(0)); 11273 ret.Add(new LSL_Float(0));
11272 break; 11274 break;
11273 case ScriptBaseClass.OBJECT_STREAMING_COST: 11275 case ScriptBaseClass.OBJECT_STREAMING_COST:
11274 // The value returned in SL for normal prims is prim count * 0.06 11276 // The linden calculation is here
11277 // http://wiki.secondlife.com/wiki/Mesh/Mesh_Streaming_Cost
11278 // The value returned in SL for normal prims looks like the prim count * 0.06
11275 ret.Add(new LSL_Float(0)); 11279 ret.Add(new LSL_Float(0));
11276 break; 11280 break;
11277 case ScriptBaseClass.OBJECT_PHYSICS_COST: 11281 case ScriptBaseClass.OBJECT_PHYSICS_COST:
11278 // The value returned in SL for normal prims is prim count 11282 // The linden calculation is here
11283 // http://wiki.secondlife.com/wiki/Mesh/Mesh_physics
11284 // The value returned in SL for normal prims looks like the prim count
11279 ret.Add(new LSL_Float(0)); 11285 ret.Add(new LSL_Float(0));
11280 break; 11286 break;
11281 default: 11287 default: