Fix sensors, llGetRootRotation(), llGet*Param() and other functions to use the world rotation if the avatar to which they are attached is sitting

This commit is contained in:
Justin Clark-Casey (justincc)
2013-03-14 21:46:29 +00:00
parent e9c394fb4e
commit ad9bd3fe93
3 changed files with 7 additions and 10 deletions

View File

@@ -353,7 +353,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
// Position of a sensor in a child prim attached to an avatar
// will be still wrong.
ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
q = avatar.Rotation * q;
q = avatar.GetWorldRotation() * q;
}
LSL_Types.Quaternion r = new LSL_Types.Quaternion(q);
@@ -480,7 +480,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
// Position of a sensor in a child prim attached to an avatar
// will be still wrong.
ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar);
q = avatar.Rotation * q;
q = avatar.GetWorldRotation() * q;
}
LSL_Types.Quaternion r = new LSL_Types.Quaternion(q);