Implementing PRIM_LINK_TARGET, but only for setting params
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>remove-scene-viewer
parent
c275c22928
commit
059f4b6a3a
|
@ -7014,10 +7014,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
List<SceneObjectPart> parts = GetLinkParts(linknumber);
|
setLinkPrimParams(linknumber, rules);
|
||||||
|
|
||||||
foreach (SceneObjectPart part in parts)
|
|
||||||
SetPrimParams(part, rules);
|
|
||||||
|
|
||||||
ScriptSleep(200);
|
ScriptSleep(200);
|
||||||
}
|
}
|
||||||
|
@ -7026,6 +7023,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
setLinkPrimParams(linknumber, rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void setLinkPrimParams(int linknumber, LSL_List rules)
|
||||||
|
{
|
||||||
List<SceneObjectPart> parts = GetLinkParts(linknumber);
|
List<SceneObjectPart> parts = GetLinkParts(linknumber);
|
||||||
|
|
||||||
foreach (SceneObjectPart part in parts)
|
foreach (SceneObjectPart part in parts)
|
||||||
|
@ -7395,6 +7397,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
LSL_Rotation lr = rules.GetQuaternionItem(idx++);
|
LSL_Rotation lr = rules.GetQuaternionItem(idx++);
|
||||||
SetRot(part, Rot2Quaternion(lr));
|
SetRot(part, Rot2Quaternion(lr));
|
||||||
break;
|
break;
|
||||||
|
case (int)ScriptBaseClass.PRIM_LINK_TARGET:
|
||||||
|
if (remain < 3) // setting to 3 on the basis that parsing any usage of PRIM_LINK_TARGET that has nothing following it is pointless.
|
||||||
|
return;
|
||||||
|
LSL_Integer new_linknumber = rules.GetLSLIntegerItem(idx++);
|
||||||
|
LSL_List new_rules = rules.GetSublist(idx, -1);
|
||||||
|
setLinkPrimParams((int)new_linknumber, new_rules);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -321,6 +321,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
public const int PRIM_NAME = 27;
|
public const int PRIM_NAME = 27;
|
||||||
public const int PRIM_DESC = 28;
|
public const int PRIM_DESC = 28;
|
||||||
public const int PRIM_ROT_LOCAL = 29;
|
public const int PRIM_ROT_LOCAL = 29;
|
||||||
|
public const int PRIM_LINK_TARGET = 34;
|
||||||
public const int PRIM_TEXGEN_DEFAULT = 0;
|
public const int PRIM_TEXGEN_DEFAULT = 0;
|
||||||
public const int PRIM_TEXGEN_PLANAR = 1;
|
public const int PRIM_TEXGEN_PLANAR = 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue