New constants for llGetObjectDetails
New constants for llGetObjectDetails OBJECT_CHARACTER_TIME, OBJECT_ROOT, OBJECT_ATTACHED_POINT, OBJECT_PATHFINDING_TYPE, OBJECT_PHYSICS, OBJECT_PHANTOM and OBJECT_TEMP_ON_REZ also Pathfining constants, 3 of which are used by llGetObjectDetailsuser_profiles
parent
4f70e423df
commit
607558fe21
|
@ -10590,6 +10590,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
case ScriptBaseClass.OBJECT_PHYSICS_COST:
|
case ScriptBaseClass.OBJECT_PHYSICS_COST:
|
||||||
ret.Add(new LSL_Float(0));
|
ret.Add(new LSL_Float(0));
|
||||||
break;
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_CHARACTER_TIME: // Pathfinding
|
||||||
|
ret.Add(new LSL_Float(0));
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_ROOT:
|
||||||
|
SceneObjectPart p = av.ParentPart;
|
||||||
|
if (p != null)
|
||||||
|
{
|
||||||
|
ret.Add(new LSL_String(p.ParentGroup.RootPart.UUID.ToString()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret.Add(new LSL_String(id));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_ATTACHED_POINT:
|
||||||
|
ret.Add(new LSL_Integer(0));
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_PATHFINDING_TYPE: // Pathfinding
|
||||||
|
ret.Add(new LSL_Integer(ScriptBaseClass.OPT_AVATAR));
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_PHYSICS:
|
||||||
|
ret.Add(new LSL_Integer(0));
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_PHANTOM:
|
||||||
|
ret.Add(new LSL_Integer(0));
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_TEMP_ON_REZ:
|
||||||
|
ret.Add(new LSL_Integer(0));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// Invalid or unhandled constant.
|
// Invalid or unhandled constant.
|
||||||
ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
|
ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
|
||||||
|
@ -10685,6 +10714,52 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
// The value returned in SL for normal prims looks like the prim count
|
// The value returned in SL for normal prims looks like the prim count
|
||||||
ret.Add(new LSL_Float(0));
|
ret.Add(new LSL_Float(0));
|
||||||
break;
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_CHARACTER_TIME: // Pathfinding
|
||||||
|
ret.Add(new LSL_Float(0));
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_ROOT:
|
||||||
|
ret.Add(new LSL_String(obj.ParentGroup.RootPart.UUID.ToString()));
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_ATTACHED_POINT:
|
||||||
|
ret.Add(new LSL_Integer(obj.ParentGroup.AttachmentPoint));
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_PATHFINDING_TYPE:
|
||||||
|
byte pcode = obj.Shape.PCode;
|
||||||
|
if (obj.ParentGroup.AttachmentPoint != 0
|
||||||
|
|| pcode == (byte)PCode.Grass
|
||||||
|
|| pcode == (byte)PCode.Tree
|
||||||
|
|| pcode == (byte)PCode.NewTree)
|
||||||
|
{
|
||||||
|
ret.Add(new LSL_Integer(ScriptBaseClass.OPT_OTHER));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret.Add(new LSL_Integer(ScriptBaseClass.OPT_LEGACY_LINKSET));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_PHYSICS:
|
||||||
|
if (obj.ParentGroup.AttachmentPoint != 0)
|
||||||
|
{
|
||||||
|
ret.Add(new LSL_Integer(0)); // Always false if attached
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret.Add(new LSL_Integer(obj.ParentGroup.UsesPhysics ? 1 : 0));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_PHANTOM:
|
||||||
|
if (obj.ParentGroup.AttachmentPoint != 0)
|
||||||
|
{
|
||||||
|
ret.Add(new LSL_Integer(0)); // Always false if attached
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ret.Add(new LSL_Integer(obj.ParentGroup.IsPhantom ? 1 : 0));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ScriptBaseClass.OBJECT_TEMP_ON_REZ:
|
||||||
|
ret.Add(new LSL_Integer(obj.ParentGroup.IsTemporary ? 1 : 0));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// Invalid or unhandled constant.
|
// Invalid or unhandled constant.
|
||||||
ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
|
ret.Add(new LSL_Integer(ScriptBaseClass.OBJECT_UNKNOWN_DETAIL));
|
||||||
|
|
|
@ -556,6 +556,23 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
public const int OBJECT_SERVER_COST = 14;
|
public const int OBJECT_SERVER_COST = 14;
|
||||||
public const int OBJECT_STREAMING_COST = 15;
|
public const int OBJECT_STREAMING_COST = 15;
|
||||||
public const int OBJECT_PHYSICS_COST = 16;
|
public const int OBJECT_PHYSICS_COST = 16;
|
||||||
|
public const int OBJECT_CHARACTER_TIME = 17;
|
||||||
|
public const int OBJECT_ROOT = 18;
|
||||||
|
public const int OBJECT_ATTACHED_POINT = 19;
|
||||||
|
public const int OBJECT_PATHFINDING_TYPE = 20;
|
||||||
|
public const int OBJECT_PHYSICS = 21;
|
||||||
|
public const int OBJECT_PHANTOM = 22;
|
||||||
|
public const int OBJECT_TEMP_ON_REZ = 23;
|
||||||
|
|
||||||
|
// Pathfinding types
|
||||||
|
public const int OPT_OTHER = -1;
|
||||||
|
public const int OPT_LEGACY_LINKSET = 0;
|
||||||
|
public const int OPT_AVATAR = 1;
|
||||||
|
public const int OPT_CHARACTER = 2;
|
||||||
|
public const int OPT_WALKABLE = 3;
|
||||||
|
public const int OPT_STATIC_OBSTACLE = 4;
|
||||||
|
public const int OPT_MATERIAL_VOLUME = 5;
|
||||||
|
public const int OPT_EXCLUSION_VOLUME = 6;
|
||||||
|
|
||||||
// for llGetAgentList
|
// for llGetAgentList
|
||||||
public const int AGENT_LIST_PARCEL = 1;
|
public const int AGENT_LIST_PARCEL = 1;
|
||||||
|
|
Loading…
Reference in New Issue