From acb1590cf063769802f35c99dd5fb6398172296f Mon Sep 17 00:00:00 2001 From: meta7 Date: Sat, 7 Aug 2010 17:32:36 -0700 Subject: Fix the unscripted sit rotation being incorrect (relative to the prim). Note that unscripted sit offset is still really poor but this is not something i'm prepared to spend time on fixing. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 56e7e93..5191236 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2053,9 +2053,13 @@ namespace OpenSim.Region.Framework.Scenes //Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); //NOTE: SendSitResponse should be relative to the GROUP *NOT* THE PRIM if we're sitting on a child - ControllingClient.SendSitResponse(part.ParentGroup.UUID, ((offset * part.RotationOffset) + part.OffsetPosition), sitOrientation, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook); + Quaternion roffset = Quaternion.Identity; + if (SitTargetisSet) + { + roffset = part.RotationOffset; + } + ControllingClient.SendSitResponse(part.ParentGroup.UUID, ((offset * roffset) + part.OffsetPosition), sitOrientation / part.RotationOffset, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook); - m_requestedSitTargetUUID = part.UUID; //KF: Correct autopilot target // This calls HandleAgentSit twice, once from here, and the client calls // HandleAgentSit itself after it gets to the location // It doesn't get to the location until we've moved them there though @@ -2441,7 +2445,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); } m_linkedPrim = part.UUID; - + m_offsetRotation = m_offsetRotation / part.RotationOffset; Velocity = Vector3.Zero; RemoveFromPhysicalScene(); Animator.TrySetMovementAnimation(sitAnimation); -- cgit v1.1