Merge branch 'master' into bigmerge
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.csavinationmerge
commit
afae9eafbe
|
@ -7504,6 +7504,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
|
setLinkPrimParams(linknumber, rules);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setLinkPrimParams(int linknumber, LSL_List rules)
|
||||||
|
{
|
||||||
List<SceneObjectPart> parts = GetLinkParts(linknumber);
|
List<SceneObjectPart> parts = GetLinkParts(linknumber);
|
||||||
List<ScenePresence> avatars = GetLinkAvatars(linknumber);
|
List<ScenePresence> avatars = GetLinkAvatars(linknumber);
|
||||||
if (parts.Count>0)
|
if (parts.Count>0)
|
||||||
|
@ -7581,6 +7586,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
bool positionChanged = false;
|
bool positionChanged = false;
|
||||||
LSL_Vector currentPosition = GetPartLocalPos(part);
|
LSL_Vector currentPosition = GetPartLocalPos(part);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
while (idx < rules.Length)
|
while (idx < rules.Length)
|
||||||
{
|
{
|
||||||
int code = rules.GetLSLIntegerItem(idx++);
|
int code = rules.GetLSLIntegerItem(idx++);
|
||||||
|
@ -7950,11 +7957,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
TargetOmega(part, axis, (double)spinrate, (double)gain);
|
TargetOmega(part, axis, (double)spinrate, (double)gain);
|
||||||
break;
|
break;
|
||||||
case (int)ScriptBaseClass.PRIM_LINK_TARGET:
|
case (int)ScriptBaseClass.PRIM_LINK_TARGET:
|
||||||
if (remain < 1)
|
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;
|
return;
|
||||||
LSL_Integer new_linknumber = rules.GetLSLIntegerItem(idx++);
|
LSL_Integer new_linknumber = rules.GetLSLIntegerItem(idx++);
|
||||||
part = part.ParentGroup.GetLinkNumPart((int)new_linknumber);
|
LSL_List new_rules = rules.GetSublist(idx, -1);
|
||||||
break;
|
setLinkPrimParams((int)new_linknumber, new_rules);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
if (positionChanged)
|
||||||
|
{
|
||||||
|
if (part.ParentGroup.RootPart == part)
|
||||||
|
{
|
||||||
|
SceneObjectGroup parent = part.ParentGroup;
|
||||||
|
parent.UpdateGroupPosition(new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
part.OffsetPosition = new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z);
|
||||||
|
SceneObjectGroup parent = part.ParentGroup;
|
||||||
|
parent.HasGroupChanged = true;
|
||||||
|
parent.ScheduleGroupForTerseUpdate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue