Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

integration
Justin Clark-Casey (justincc) 2012-04-06 21:15:31 +01:00
commit 47108bb351
2 changed files with 82 additions and 0 deletions

View File

@ -10354,6 +10354,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case ScriptBaseClass.OBJECT_CREATOR: case ScriptBaseClass.OBJECT_CREATOR:
ret.Add(new LSL_String(UUID.Zero.ToString())); ret.Add(new LSL_String(UUID.Zero.ToString()));
break; break;
// For the following 8 see the Object version below
case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT:
ret.Add(new LSL_Integer(0));
break;
case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT:
ret.Add(new LSL_Integer(0));
break;
case ScriptBaseClass.OBJECT_SCRIPT_MEMORY:
ret.Add(new LSL_Integer(0));
break;
case ScriptBaseClass.OBJECT_SCRIPT_TIME:
ret.Add(new LSL_Float(0));
break;
case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
ret.Add(new LSL_Integer(0));
break;
case ScriptBaseClass.OBJECT_SERVER_COST:
ret.Add(new LSL_Float(0));
break;
case ScriptBaseClass.OBJECT_STREAMING_COST:
ret.Add(new LSL_Float(0));
break;
case ScriptBaseClass.OBJECT_PHYSICS_COST:
ret.Add(new LSL_Float(0));
break;
default:
// Invalid or unhandled constant.
ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
break;
} }
} }
@ -10391,6 +10420,49 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
case ScriptBaseClass.OBJECT_CREATOR: case ScriptBaseClass.OBJECT_CREATOR:
ret.Add(new LSL_String(obj.CreatorID.ToString())); ret.Add(new LSL_String(obj.CreatorID.ToString()));
break; break;
// The following 8 I have intentionaly coded to return zero. They are part of
// "Land Impact" calculations. These calculations are probably not applicable
// to OpenSim, required figures (cpu/memory usage) are not currently tracked
// I have intentionally left these all at zero rather than return possibly
// missleading numbers
case ScriptBaseClass.OBJECT_RUNNING_SCRIPT_COUNT:
// in SL this currently includes crashed scripts
ret.Add(new LSL_Integer(0));
break;
case ScriptBaseClass.OBJECT_TOTAL_SCRIPT_COUNT:
ret.Add(new LSL_Integer(0));
break;
case ScriptBaseClass.OBJECT_SCRIPT_MEMORY:
// The value returned in SL for mono scripts is 65536 * number of active scripts
ret.Add(new LSL_Integer(0));
break;
case ScriptBaseClass.OBJECT_SCRIPT_TIME:
// Average cpu time per simulator frame expended on all scripts in the objetc
ret.Add(new LSL_Float(0));
break;
case ScriptBaseClass.OBJECT_PRIM_EQUIVALENCE:
// according to the SL wiki A prim or linkset will have prim
// equivalent of the number of prims in a linkset if it does not
// contain a mesh anywhere in the link set or is not a normal prim
// The value returned in SL for normal prims is prim count
ret.Add(new LSL_Integer(0));
break;
case ScriptBaseClass.OBJECT_SERVER_COST:
// The value returned in SL for normal prims is prim count
ret.Add(new LSL_Float(0));
break;
case ScriptBaseClass.OBJECT_STREAMING_COST:
// The value returned in SL for normal prims is prim count * 0.06
ret.Add(new LSL_Float(0));
break;
case ScriptBaseClass.OBJECT_PHYSICS_COST:
// The value returned in SL for normal prims is prim count
ret.Add(new LSL_Float(0));
break;
default:
// Invalid or unhandled constant.
ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
break;
} }
} }

View File

@ -479,6 +479,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int DEBUG_CHANNEL = 0x7FFFFFFF; public const int DEBUG_CHANNEL = 0x7FFFFFFF;
public const int PUBLIC_CHANNEL = 0x00000000; public const int PUBLIC_CHANNEL = 0x00000000;
// Constants for llGetObjectDetails
public const int OBJECT_UNKNOWN_DETAIL = -1;
public const int OBJECT_NAME = 1; public const int OBJECT_NAME = 1;
public const int OBJECT_DESC = 2; public const int OBJECT_DESC = 2;
public const int OBJECT_POS = 3; public const int OBJECT_POS = 3;
@ -487,6 +489,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
public const int OBJECT_OWNER = 6; public const int OBJECT_OWNER = 6;
public const int OBJECT_GROUP = 7; public const int OBJECT_GROUP = 7;
public const int OBJECT_CREATOR = 8; public const int OBJECT_CREATOR = 8;
public const int OBJECT_RUNNING_SCRIPT_COUNT = 9;
public const int OBJECT_TOTAL_SCRIPT_COUNT = 10;
public const int OBJECT_SCRIPT_MEMORY = 11;
public const int OBJECT_SCRIPT_TIME = 12;
public const int OBJECT_PRIM_EQUIVALENCE = 13;
public const int OBJECT_SERVER_COST = 14;
public const int OBJECT_STREAMING_COST = 15;
public const int OBJECT_PHYSICS_COST = 16;
// Can not be public const? // Can not be public const?
public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0); public static readonly vector ZERO_VECTOR = new vector(0.0, 0.0, 0.0);