Fix for llGetRot when the script is in a child prim. Also fixed llGetPrimitiveParams for PRIM_ROTATION.
Fixes Mantis #30230.6.3-post-fixes
parent
f8aea3724d
commit
04a565e6b1
|
@ -1857,6 +1857,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
|
part.ParentGroup.AbsolutePosition = part.ParentGroup.AbsolutePosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// See http://lslwiki.net/lslwiki/wakka.php?wakka=ChildRotation
|
||||||
|
/// </summary>
|
||||||
public LSL_Rotation llGetRot()
|
public LSL_Rotation llGetRot()
|
||||||
{
|
{
|
||||||
// unlinked or root prim then use llRootRotation
|
// unlinked or root prim then use llRootRotation
|
||||||
|
@ -1866,7 +1869,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
return llGetRootRotation();
|
return llGetRootRotation();
|
||||||
}
|
}
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
Quaternion q = m_host.RotationOffset;
|
Quaternion q = m_host.GetWorldRotation();
|
||||||
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
|
return new LSL_Rotation(q.X, q.Y, q.Z, q.W);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6816,10 +6819,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (int)ScriptBaseClass.PRIM_ROTATION:
|
case (int)ScriptBaseClass.PRIM_ROTATION:
|
||||||
res.Add(new LSL_Rotation(m_host.RotationOffset.X,
|
res.Add(llGetRot());
|
||||||
m_host.RotationOffset.Y,
|
|
||||||
m_host.RotationOffset.Z,
|
|
||||||
m_host.RotationOffset.W));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (int)ScriptBaseClass.PRIM_TYPE:
|
case (int)ScriptBaseClass.PRIM_TYPE:
|
||||||
|
|
Loading…
Reference in New Issue