When positioning agent with PRIM_ROTATION in llSetLinkPrimitiveParams(), set the global rotation rather than the local rotation

Functionally the same as the patch in http://opensimulator.org/mantis/view.php?id=7044, thanks Aleric.
This commit also extends the regression test
This commit is contained in:
Justin Clark-Casey (justincc)
2014-03-03 20:58:54 +00:00
parent 5038a59ef3
commit 31de7b845f
2 changed files with 35 additions and 9 deletions

View File

@@ -8047,7 +8047,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
sp.OffsetPosition = rules.GetVector3Item(idx++);
break;
case (int)ScriptBaseClass.PRIM_ROTATION:
case (int)ScriptBaseClass.PRIM_ROTATION:
if (remain < 1)
return null;
Quaternion inRot = rules.GetQuaternionItem(idx++);
SceneObjectPart parentPart = sp.ParentPart;
if (parentPart != null)
sp.Rotation = m_host.GetWorldRotation() * inRot;
break;
case (int)ScriptBaseClass.PRIM_ROT_LOCAL:
if (remain < 1)
return null;