Revert "made setting rotation match Second Life"

Second Life seems to have introduced a bug, as we have confirmation that SL
behavior changed recently and changed in contradiction to their stated intention
This appears to be another of the bugs SL is notorious for. Signpost and I have
decided to back this out until SL's intention becomes clear.

This reverts commit f7b88d1c40.
integration
Melanie 2012-09-03 21:52:12 +01:00
parent 29218cdb31
commit d297eb39e5
1 changed files with 32 additions and 1 deletions

View File

@ -2083,7 +2083,23 @@ 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.ParentID == 0)
{
// special case: If we are root, rotate complete SOG to new rotation
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 = m_host.ParentGroup.RootPart;
if (rootPart != null) // better safe than sorry
{
SetRot(m_host, rootPart.RotationOffset * (Quaternion)rot);
}
}
ScriptSleep(200); ScriptSleep(200);
} }
@ -7276,12 +7292,22 @@ 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++); LSL_Rotation q = rules.GetQuaternionItem(idx++);
// try to let this work as in SL...
if (part.ParentID == 0)
{
// special case: If we are root, rotate complete SOG to new rotation
SetRot(part, q); 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.
SceneObjectPart rootPart = part.ParentGroup.RootPart;
SetRot(part, rootPart.RotationOffset * (Quaternion)q);
}
break; break;
@ -7588,6 +7614,11 @@ 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;