add suport for PRIM_SIT_TARGET on get(link)PrimitveParameters and fix typos
parent
be0a957363
commit
060350832a
|
@ -662,7 +662,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
List<SceneObjectPart> ret = new List<SceneObjectPart>();
|
||||
if (part == null || part.ParentGroup == null || part.ParentGroup.IsDeleted)
|
||||
return ret;
|
||||
ret.Add(part);
|
||||
|
||||
switch (linkType)
|
||||
{
|
||||
|
@ -670,7 +669,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return new List<SceneObjectPart>(part.ParentGroup.Parts);
|
||||
|
||||
case ScriptBaseClass.LINK_ROOT:
|
||||
ret = new List<SceneObjectPart>();
|
||||
ret.Add(part.ParentGroup.RootPart);
|
||||
return ret;
|
||||
|
||||
|
@ -690,16 +688,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return ret;
|
||||
|
||||
case ScriptBaseClass.LINK_THIS:
|
||||
ret.Add(part);
|
||||
return ret;
|
||||
|
||||
default:
|
||||
if (linkType < 0)
|
||||
return new List<SceneObjectPart>();
|
||||
return ret;
|
||||
|
||||
SceneObjectPart target = part.ParentGroup.GetLinkNumPart(linkType);
|
||||
if (target == null)
|
||||
return new List<SceneObjectPart>();
|
||||
ret = new List<SceneObjectPart>();
|
||||
return ret;
|
||||
ret.Add(target);
|
||||
return ret;
|
||||
}
|
||||
|
@ -11183,6 +11181,21 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
res.Add(new LSL_Float(gain));
|
||||
break;
|
||||
|
||||
case (int)ScriptBaseClass.PRIM_SIT_TARGET:
|
||||
if(part.IsSitTargetSet)
|
||||
{
|
||||
res.Add(new LSL_Integer(1));
|
||||
res.Add(new LSL_Vector(part.SitTargetPosition));
|
||||
res.Add(new LSL_Rotation(part.SitTargetOrientation));
|
||||
}
|
||||
else
|
||||
{
|
||||
res.Add(new LSL_Integer(0));
|
||||
res.Add(new LSL_Vector(Vector3.Zero));
|
||||
res.Add(new LSL_Rotation(Quaternion.Identity));
|
||||
}
|
||||
break;
|
||||
|
||||
case (int)ScriptBaseClass.PRIM_LINK_TARGET:
|
||||
|
||||
// TODO: Should be issuing a runtime script warning in this case.
|
||||
|
|
|
@ -339,7 +339,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
|
||||
// LINK flags
|
||||
public const int LINK_SET = -1;
|
||||
public const int LINK_TRUEROOT = 0; // possible this should had been ROOT all the time
|
||||
public const int LINK_ROOT = 1;
|
||||
public const int LINK_ALL_OTHERS = -2;
|
||||
public const int LINK_ALL_CHILDREN = -3;
|
||||
|
@ -418,7 +417,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
public const int PRIM_DESC = 28;
|
||||
public const int PRIM_ROT_LOCAL = 29;
|
||||
public const int PRIM_PHYSICS_SHAPE_TYPE = 30;
|
||||
public const int PRIM_PHYSICS_MATERIAL = 31; // aparently not SL
|
||||
public const int PRIM_PHYSICS_MATERIAL = 31; // apparently not on SL wiki
|
||||
public const int PRIM_OMEGA = 32;
|
||||
public const int PRIM_POS_LOCAL = 33;
|
||||
public const int PRIM_LINK_TARGET = 34;
|
||||
|
@ -426,9 +425,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
public const int PRIM_SPECULAR = 36;
|
||||
public const int PRIM_NORMAL = 37;
|
||||
public const int PRIM_ALPHA_MODE = 38;
|
||||
public const int PRIM_ALLOW_UNSIT = 39; // experiences related. Unsuport
|
||||
public const int PRIM_SCRIPTED_SIT_ONLY = 40; // experiences related. Unsuport
|
||||
public const int PRIM_SIT_TARGET = 40;
|
||||
public const int PRIM_ALLOW_UNSIT = 39; // experiences related. unsupported
|
||||
public const int PRIM_SCRIPTED_SIT_ONLY = 40; // experiences related. unsupported
|
||||
public const int PRIM_SIT_TARGET = 41;
|
||||
|
||||
|
||||
// parameters
|
||||
|
|
Loading…
Reference in New Issue