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);
|
||||
|
||||
setLinkPrimParams(linknumber, rules);
|
||||
}
|
||||
|
||||
private void setLinkPrimParams(int linknumber, LSL_List rules)
|
||||
{
|
||||
List<SceneObjectPart> parts = GetLinkParts(linknumber);
|
||||
List<ScenePresence> avatars = GetLinkAvatars(linknumber);
|
||||
if (parts.Count>0)
|
||||
|
@ -7581,6 +7586,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
bool positionChanged = false;
|
||||
LSL_Vector currentPosition = GetPartLocalPos(part);
|
||||
|
||||
try
|
||||
{
|
||||
while (idx < rules.Length)
|
||||
{
|
||||
int code = rules.GetLSLIntegerItem(idx++);
|
||||
|
@ -7950,11 +7957,32 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
TargetOmega(part, axis, (double)spinrate, (double)gain);
|
||||
break;
|
||||
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;
|
||||
LSL_Integer new_linknumber = rules.GetLSLIntegerItem(idx++);
|
||||
part = part.ParentGroup.GetLinkNumPart((int)new_linknumber);
|
||||
break;
|
||||
LSL_List new_rules = rules.GetSublist(idx, -1);
|
||||
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