aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorTalun2012-04-06 19:11:09 +0100
committernebadon2012-04-06 12:42:46 -0700
commitc3a8c00ce0e60b0988fc0d62712e896e5c3e1ac8 (patch)
treec86f1d2fbf5924455cb14a8d2689f0f95d8e3ba3 /OpenSim/Region/ScriptEngine
parentMake llGetMass() return total mass of object when called on root prim. (diff)
downloadopensim-SC_OLD-c3a8c00ce0e60b0988fc0d62712e896e5c3e1ac8.zip
opensim-SC_OLD-c3a8c00ce0e60b0988fc0d62712e896e5c3e1ac8.tar.gz
opensim-SC_OLD-c3a8c00ce0e60b0988fc0d62712e896e5c3e1ac8.tar.bz2
opensim-SC_OLD-c3a8c00ce0e60b0988fc0d62712e896e5c3e1ac8.tar.xz
Addition of missing constants for llGetObjectDetails including for Mantis 5502
Signed-off-by: nebadon <michael@osgrid.org>
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs72
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs10
2 files changed, 82 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index 43b66f4..a046f29 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -10333,6 +10333,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10333 case ScriptBaseClass.OBJECT_CREATOR: 10333 case ScriptBaseClass.OBJECT_CREATOR:
10334 ret.Add(new LSL_String(UUID.Zero.ToString())); 10334 ret.Add(new LSL_String(UUID.Zero.ToString()));
10335 break; 10335 break;
10336 // For the following 8 see the Object version below
10337 case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT:
10338 ret.Add(new LSL_Integer(0));
10339 break;
10340 case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT:
10341 ret.Add(new LSL_Integer(0));
10342 break;
10343 case ScriptBaseClass.OBJECT_SCRIPT_MEMORY:
10344 ret.Add(new LSL_Integer(0));
10345 break;
10346 case ScriptBaseClass.OBJECT_SCRIPT_TIME:
10347 ret.Add(new LSL_Float(0));
10348 break;
10349 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
10350 ret.Add(new LSL_Integer(0));
10351 break;
10352 case ScriptBaseClass.OBJECT_SERVER_COST:
10353 ret.Add(new LSL_Float(0));
10354 break;
10355 case ScriptBaseClass.OBJECT_STREAMING_COST:
10356 ret.Add(new LSL_Float(0));
10357 break;
10358 case ScriptBaseClass.OBJECT_PHYSICS_COST:
10359 ret.Add(new LSL_Float(0));
10360 break;
10361 default:
10362 // Invalid or unhandled constant.
10363 ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
10364 break;
10336 } 10365 }
10337 } 10366 }
10338 10367
@@ -10370,6 +10399,49 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10370 case ScriptBaseClass.OBJECT_CREATOR: 10399 case ScriptBaseClass.OBJECT_CREATOR:
10371 ret.Add(new LSL_String(obj.CreatorID.ToString())); 10400 ret.Add(new LSL_String(obj.CreatorID.ToString()));
10372 break; 10401 break;
10402 // The following 8 I have intentionaly coded to return zero. They are part of
10403 // "Land Impact" calculations. These calculations are probably not applicable
10404 // to OpenSim, required figures (cpu/memory usage) are not currently tracked
10405 // I have intentionally left these all at zero rather than return possibly
10406 // missleading numbers
10407 case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT:
10408 // in SL this currently includes crashed scripts
10409 ret.Add(new LSL_Integer(0));
10410 break;
10411 case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT:
10412 ret.Add(new LSL_Integer(0));
10413 break;
10414 case ScriptBaseClass.OBJECT_SCRIPT_MEMORY:
10415 // The value returned in SL for mono scripts is 65536 * number of active scripts
10416 ret.Add(new LSL_Integer(0));
10417 break;
10418 case ScriptBaseClass.OBJECT_SCRIPT_TIME:
10419 // Average cpu time per simulator frame expended on all scripts in the objetc
10420 ret.Add(new LSL_Float(0));
10421 break;
10422 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
10423 // according to the SL wiki A prim or linkset will have prim
10424 // equivalent of the number of prims in a linkset if it does not
10425 // contain a mesh anywhere in the link set or is not a normal prim
10426 // The value returned in SL for normal prims is prim count
10427 ret.Add(new LSL_Integer(0));
10428 break;
10429 case ScriptBaseClass.OBJECT_SERVER_COST:
10430 // The value returned in SL for normal prims is prim count
10431 ret.Add(new LSL_Float(0));
10432 break;
10433 case ScriptBaseClass.OBJECT_STREAMING_COST:
10434 // The value returned in SL for normal prims is prim count * 0.06
10435 ret.Add(new LSL_Float(0));
10436 break;
10437 case ScriptBaseClass.OBJECT_PHYSICS_COST:
10438 // The value returned in SL for normal prims is prim count
10439 ret.Add(new LSL_Float(0));
10440 break;
10441 default:
10442 // Invalid or unhandled constant.
10443 ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
10444 break;
10373 } 10445 }
10374 } 10446 }
10375 10447
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
index 5a53e15..f58f9d6 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/LSL_Constants.cs
@@ -479,6 +479,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
479 public const int DEBUG_CHANNEL = 0x7FFFFFFF; 479 public const int DEBUG_CHANNEL = 0x7FFFFFFF;
480 public const int PUBLIC_CHANNEL = 0x00000000; 480 public const int PUBLIC_CHANNEL = 0x00000000;
481 481
482 // Constants for llGetObjectDetails
483 public const int OBJECT_UNKNOWN_DETAIL = -1;
482 public const int OBJECT_NAME = 1; 484 public const int OBJECT_NAME = 1;
483 public const int OBJECT_DESC = 2; 485 public const int OBJECT_DESC = 2;
484 public const int OBJECT_POS = 3; 486 public const int OBJECT_POS = 3;
@@ -487,6 +489,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
487 public const int OBJECT_OWNER = 6; 489 public const int OBJECT_OWNER = 6;
488 public const int OBJECT_GROUP = 7; 490 public const int OBJECT_GROUP = 7;
489 public const int OBJECT_CREATOR = 8; 491 public const int OBJECT_CREATOR = 8;
492 public const int OBJECT_RUNNING_SCRIPT_COUNT = 9;
493 public const int OBJECT_TOTAL_SCRIPT_COUNT = 10;
494 public const int OBJECT_SCRIPT_MEMORY = 11;
495 public const int OBJECT_SCRIPT_TIME = 12;
496 public const int OBJECT_PRIM_EQUIVALENCE = 13;
497 public const int OBJECT_SERVER_COST = 14;
498 public const int OBJECT_STREAMING_COST = 15;
499 public const int OBJECT_PHYSICS_COST = 16;
490 500
491 // Can not be public const? 501 // Can not be public const?
492 public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); 502 public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0);