diff options
author | Justin Clark-Casey (justincc) | 2013-12-11 23:59:52 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-12-11 23:59:52 +0000 |
commit | 1d605642f78f46fed9e4cd38b117555717f87309 (patch) | |
tree | 0723c3f27a8bc95a5f5e37046a6004e8ec9c1dc5 /OpenSim | |
parent | Replace proprietary file header with BSD one (diff) | |
download | opensim-SC-1d605642f78f46fed9e4cd38b117555717f87309.zip opensim-SC-1d605642f78f46fed9e4cd38b117555717f87309.tar.gz opensim-SC-1d605642f78f46fed9e4cd38b117555717f87309.tar.bz2 opensim-SC-1d605642f78f46fed9e4cd38b117555717f87309.tar.xz |
Refix sitting on child prims by reinserting relevant code back into SP.HandleAgentSit()
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index edb8ca8..0282ad0 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2868,14 +2868,33 @@ namespace OpenSim.Region.Framework.Scenes | |||
2868 | 2868 | ||
2869 | m_pos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; | 2869 | m_pos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; |
2870 | 2870 | ||
2871 | // m_pos = sitTargetPos + SIT_TARGET_ADJUSTMENT - sitOffset; | 2871 | Vector3 newPos = sitTargetPos + sitOffset + SIT_TARGET_ADJUSTMENT; |
2872 | Rotation = sitTargetOrient; | 2872 | Quaternion newRot; |
2873 | |||
2874 | if (part.IsRoot) | ||
2875 | { | ||
2876 | newRot = sitTargetOrient; | ||
2877 | } | ||
2878 | else | ||
2879 | { | ||
2880 | newPos = newPos * part.RotationOffset; | ||
2881 | newRot = part.RotationOffset * sitTargetOrient; | ||
2882 | } | ||
2883 | |||
2884 | newPos += part.OffsetPosition; | ||
2885 | |||
2886 | m_pos = newPos; | ||
2887 | Rotation = newRot; | ||
2888 | |||
2873 | // ParentPosition = part.AbsolutePosition; | 2889 | // ParentPosition = part.AbsolutePosition; |
2874 | part.ParentGroup.AddAvatar(UUID); | 2890 | part.ParentGroup.AddAvatar(UUID); |
2875 | } | 2891 | } |
2876 | else | 2892 | else |
2877 | { | 2893 | { |
2878 | m_pos -= part.AbsolutePosition; | 2894 | // An viewer expects to specify sit positions as offsets to the root prim, even if a child prim is |
2895 | // being sat upon. | ||
2896 | m_pos -= part.GroupPosition; | ||
2897 | |||
2879 | // ParentPosition = part.AbsolutePosition; | 2898 | // ParentPosition = part.AbsolutePosition; |
2880 | part.ParentGroup.AddAvatar(UUID); | 2899 | part.ParentGroup.AddAvatar(UUID); |
2881 | 2900 | ||