Merge branch 'master' into careminster
Conflicts: OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.csavinationmerge
commit
96b50d28f4
|
@ -2314,31 +2314,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public void llSetRot(LSL_Rotation rot)
|
public void llSetRot(LSL_Rotation rot)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
|
|
||||||
// try to let this work as in SL...
|
|
||||||
if (m_host.LinkNum < 2)
|
|
||||||
{
|
|
||||||
// Special case: If we are root, rotate complete SOG to new
|
|
||||||
// rotation.
|
|
||||||
// We are root if the link number is 0 (single prim) or 1
|
|
||||||
// (root prim). ParentID may be nonzero in attachments and
|
|
||||||
// using it would cause attachments and HUDs to rotate
|
|
||||||
// to the wrong positions.
|
|
||||||
|
|
||||||
SetRot(m_host, rot);
|
SetRot(m_host, rot);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask.
|
|
||||||
SceneObjectPart rootPart;
|
|
||||||
if (m_host.ParentGroup != null) // better safe than sorry
|
|
||||||
{
|
|
||||||
rootPart = m_host.ParentGroup.RootPart;
|
|
||||||
if (rootPart != null)
|
|
||||||
SetRot(m_host, rootPart.RotationOffset * (Quaternion)rot);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ScriptSleep(200);
|
ScriptSleep(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7870,23 +7846,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case (int)ScriptBaseClass.PRIM_ROTATION:
|
case (int)ScriptBaseClass.PRIM_ROTATION:
|
||||||
|
case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
|
||||||
if (remain < 1)
|
if (remain < 1)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
LSL_Rotation q = rules.GetQuaternionItem(idx++);
|
SetRot(part, rules.GetQuaternionItem(idx++));
|
||||||
SceneObjectPart rootPart = parentgrp.RootPart;
|
|
||||||
// try to let this work as in SL...
|
|
||||||
if (rootPart == part)
|
|
||||||
{
|
|
||||||
// special case: If we are root, rotate complete SOG to new rotation
|
|
||||||
SetRot(part, q);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// we are a child. The rotation values will be set to the one of root modified by rot, as in SL. Don't ask.
|
|
||||||
// sounds like sl bug that we need to replicate
|
|
||||||
SetRot(part, rootPart.RotationOffset * (Quaternion)q);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -8223,11 +8187,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
string primDesc = rules.GetLSLStringItem(idx++);
|
string primDesc = rules.GetLSLStringItem(idx++);
|
||||||
part.Description = primDesc;
|
part.Description = primDesc;
|
||||||
break;
|
break;
|
||||||
case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
|
|
||||||
if (remain < 1)
|
|
||||||
return null;
|
|
||||||
SetRot(part, rules.GetQuaternionItem(idx++));
|
|
||||||
break;
|
|
||||||
case (int)ScriptBaseClass.PRIM_OMEGA:
|
case (int)ScriptBaseClass.PRIM_OMEGA:
|
||||||
if (remain < 3)
|
if (remain < 3)
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue