mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user