aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-04-06 21:15:31 +0100
committerJustin Clark-Casey (justincc)2012-04-06 21:15:31 +0100
commit47108bb351b65f14be4770eb76ff71f5db34c409 (patch)
tree0b4ac44e2d60a4a9c0ffd59857fa80f25c423f0d /OpenSim/Region
parentFor llGetMass(), return the mass of the avatar is the object is attached. (diff)
parentAddition of missing constants for llGetObjectDetails including for Mantis 5502 (diff)
downloadopensim-SC-47108bb351b65f14be4770eb76ff71f5db34c409.zip
opensim-SC-47108bb351b65f14be4770eb76ff71f5db34c409.tar.gz
opensim-SC-47108bb351b65f14be4770eb76ff71f5db34c409.tar.bz2
opensim-SC-47108bb351b65f14be4770eb76ff71f5db34c409.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region')
-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 17f5a64..a85a36e 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -10354,6 +10354,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10354 case ScriptBaseClass.OBJECT_CREATOR: 10354 case ScriptBaseClass.OBJECT_CREATOR:
10355 ret.Add(new LSL_String(UUID.Zero.ToString())); 10355 ret.Add(new LSL_String(UUID.Zero.ToString()));
10356 break; 10356 break;
10357 // For the following 8 see the Object version below
10358 case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT:
10359 ret.Add(new LSL_Integer(0));
10360 break;
10361 case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT:
10362 ret.Add(new LSL_Integer(0));
10363 break;
10364 case ScriptBaseClass.OBJECT_SCRIPT_MEMORY:
10365 ret.Add(new LSL_Integer(0));
10366 break;
10367 case ScriptBaseClass.OBJECT_SCRIPT_TIME:
10368 ret.Add(new LSL_Float(0));
10369 break;
10370 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
10371 ret.Add(new LSL_Integer(0));
10372 break;
10373 case ScriptBaseClass.OBJECT_SERVER_COST:
10374 ret.Add(new LSL_Float(0));
10375 break;
10376 case ScriptBaseClass.OBJECT_STREAMING_COST:
10377 ret.Add(new LSL_Float(0));
10378 break;
10379 case ScriptBaseClass.OBJECT_PHYSICS_COST:
10380 ret.Add(new LSL_Float(0));
10381 break;
10382 default:
10383 // Invalid or unhandled constant.
10384 ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
10385 break;
10357 } 10386 }
10358 } 10387 }
10359 10388
@@ -10391,6 +10420,49 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
10391 case ScriptBaseClass.OBJECT_CREATOR: 10420 case ScriptBaseClass.OBJECT_CREATOR:
10392 ret.Add(new LSL_String(obj.CreatorID.ToString())); 10421 ret.Add(new LSL_String(obj.CreatorID.ToString()));
10393 break; 10422 break;
10423 // The following 8 I have intentionaly coded to return zero. They are part of
10424 // "Land Impact" calculations. These calculations are probably not applicable
10425 // to OpenSim, required figures (cpu/memory usage) are not currently tracked
10426 // I have intentionally left these all at zero rather than return possibly
10427 // missleading numbers
10428 case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT:
10429 // in SL this currently includes crashed scripts
10430 ret.Add(new LSL_Integer(0));
10431 break;
10432 case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT:
10433 ret.Add(new LSL_Integer(0));
10434 break;
10435 case ScriptBaseClass.OBJECT_SCRIPT_MEMORY:
10436 // The value returned in SL for mono scripts is 65536 * number of active scripts
10437 ret.Add(new LSL_Integer(0));
10438 break;
10439 case ScriptBaseClass.OBJECT_SCRIPT_TIME:
10440 // Average cpu time per simulator frame expended on all scripts in the objetc
10441 ret.Add(new LSL_Float(0));
10442 break;
10443 case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
10444 // according to the SL wiki A prim or linkset will have prim
10445 // equivalent of the number of prims in a linkset if it does not
10446 // contain a mesh anywhere in the link set or is not a normal prim
10447 // The value returned in SL for normal prims is prim count
10448 ret.Add(new LSL_Integer(0));
10449 break;
10450 case ScriptBaseClass.OBJECT_SERVER_COST:
10451 // The value returned in SL for normal prims is prim count
10452 ret.Add(new LSL_Float(0));
10453 break;
10454 case ScriptBaseClass.OBJECT_STREAMING_COST:
10455 // The value returned in SL for normal prims is prim count * 0.06
10456 ret.Add(new LSL_Float(0));
10457 break;
10458 case ScriptBaseClass.OBJECT_PHYSICS_COST:
10459 // The value returned in SL for normal prims is prim count
10460 ret.Add(new LSL_Float(0));
10461 break;
10462 default:
10463 // Invalid or unhandled constant.
10464 ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
10465 break;
10394 } 10466 }
10395 } 10467 }
10396 10468
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);