From ff4e7de7769b7eaa1b4fd3917e59f362b708226a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 23 Nov 2013 00:53:09 +0000 Subject: Fix issue where sitting on non-root linked prims would send camera to wrong position in third-person and mouselook We now specify sits as offsets from the root prim, as the viewer expects. --- OpenSim/Region/Framework/Scenes/ScenePresence.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 7243db1..ea8e4fe 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs @@ -2312,8 +2312,10 @@ namespace OpenSim.Region.Framework.Scenes cameraEyeOffset = part.GetCameraEyeOffset(); forceMouselook = part.GetForceMouselook(); + // An viewer expects to specify sit positions as offsets to the root prim, even if a child prim is + // being sat upon. ControllingClient.SendSitResponse( - part.UUID, offset, sitOrientation, false, cameraAtOffset, cameraEyeOffset, forceMouselook); + part.ParentGroup.UUID, offset, sitOrientation, false, cameraAtOffset, cameraEyeOffset, forceMouselook); m_requestedSitTargetUUID = part.UUID; @@ -2592,7 +2594,10 @@ namespace OpenSim.Region.Framework.Scenes } else { - m_pos -= part.AbsolutePosition; + // An viewer expects to specify sit positions as offsets to the root prim, even if a child prim is + // being sat upon. + m_pos -= part.GroupPosition; + ParentPosition = part.AbsolutePosition; // m_log.DebugFormat( -- cgit v1.1