diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 56e7e93..cca296e 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2007,7 +2007,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2007 | if (autopilot) | 2007 | if (autopilot) |
2008 | { // its not a scripted sit | 2008 | { // its not a scripted sit |
2009 | // if (Util.GetDistanceTo(AbsolutePosition, autopilotTarget) < 4.5) | 2009 | // if (Util.GetDistanceTo(AbsolutePosition, autopilotTarget) < 4.5) |
2010 | if( (Math.Abs(AbsolutePosition.X - autopilotTarget.X) < 10.0f) && (Math.Abs(AbsolutePosition.Y - autopilotTarget.Y) < 10.0f) ) | 2010 | if( (Math.Abs(AbsolutePosition.X - autopilotTarget.X) < 256.0f) && (Math.Abs(AbsolutePosition.Y - autopilotTarget.Y) < 256.0f) ) |
2011 | { | 2011 | { |
2012 | autopilot = false; // close enough | 2012 | autopilot = false; // close enough |
2013 | m_lastWorldPosition = m_pos; /* CW - This give us a position to return the avatar to if the part is killed before standup. | 2013 | m_lastWorldPosition = m_pos; /* CW - This give us a position to return the avatar to if the part is killed before standup. |
@@ -2053,9 +2053,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2053 | //Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); | 2053 | //Console.WriteLine("Camera Eye ={0}", cameraEyeOffset); |
2054 | 2054 | ||
2055 | //NOTE: SendSitResponse should be relative to the GROUP *NOT* THE PRIM if we're sitting on a child | 2055 | //NOTE: SendSitResponse should be relative to the GROUP *NOT* THE PRIM if we're sitting on a child |
2056 | ControllingClient.SendSitResponse(part.ParentGroup.UUID, ((offset * part.RotationOffset) + part.OffsetPosition), sitOrientation, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook); | 2056 | Quaternion roffset = Quaternion.Identity; |
2057 | if (SitTargetisSet) | ||
2058 | { | ||
2059 | roffset = part.RotationOffset; | ||
2060 | } | ||
2061 | ControllingClient.SendSitResponse(part.ParentGroup.UUID, ((offset * roffset) + part.OffsetPosition), sitOrientation / part.RotationOffset, autopilot, cameraAtOffset, cameraEyeOffset, forceMouselook); | ||
2057 | 2062 | ||
2058 | m_requestedSitTargetUUID = part.UUID; //KF: Correct autopilot target | ||
2059 | // This calls HandleAgentSit twice, once from here, and the client calls | 2063 | // This calls HandleAgentSit twice, once from here, and the client calls |
2060 | // HandleAgentSit itself after it gets to the location | 2064 | // HandleAgentSit itself after it gets to the location |
2061 | // It doesn't get to the location until we've moved them there though | 2065 | // It doesn't get to the location until we've moved them there though |
@@ -2374,8 +2378,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2374 | m_bodyRot = sitTargetOrient; | 2378 | m_bodyRot = sitTargetOrient; |
2375 | m_parentPosition = part.AbsolutePosition; | 2379 | m_parentPosition = part.AbsolutePosition; |
2376 | part.IsOccupied = true; | 2380 | part.IsOccupied = true; |
2377 | part.ParentGroup.AddAvatar(agentID); | 2381 | part.ParentGroup.AddAvatar(agentID); |
2378 | Console.WriteLine("Scripted Sit ofset {0}", m_pos); | ||
2379 | } | 2382 | } |
2380 | else | 2383 | else |
2381 | { | 2384 | { |
@@ -2441,7 +2444,7 @@ Console.WriteLine("Scripted Sit ofset {0}", m_pos); | |||
2441 | } | 2444 | } |
2442 | 2445 | ||
2443 | m_linkedPrim = part.UUID; | 2446 | m_linkedPrim = part.UUID; |
2444 | 2447 | m_offsetRotation = m_offsetRotation / part.RotationOffset; | |
2445 | Velocity = Vector3.Zero; | 2448 | Velocity = Vector3.Zero; |
2446 | RemoveFromPhysicalScene(); | 2449 | RemoveFromPhysicalScene(); |
2447 | Animator.TrySetMovementAnimation(sitAnimation); | 2450 | Animator.TrySetMovementAnimation(sitAnimation); |