aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 23507f4..e31270c 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -3043,13 +3043,10 @@ namespace OpenSim.Region.Framework.Scenes
3043 3043
3044 Vector3 oldPos; 3044 Vector3 oldPos;
3045 3045
3046 // FIXME: This improves the situation where editing just the root prim of an attached object would send
3047 // all the other parts to oblivion after detach/reattach. However, a problem remains since the root prim
3048 // still ends up in the wrong position on reattach.
3049 if (IsAttachment) 3046 if (IsAttachment)
3050 oldPos = RootPart.OffsetPosition; 3047 oldPos = m_rootPart.AttachedPos + m_rootPart.OffsetPosition; // OffsetPosition should always be 0 in an attachments's root prim
3051 else 3048 else
3052 oldPos = AbsolutePosition + RootPart.OffsetPosition; 3049 oldPos = AbsolutePosition + m_rootPart.OffsetPosition;
3053 3050
3054 Vector3 diff = oldPos - newPos; 3051 Vector3 diff = oldPos - newPos;
3055 Quaternion partRotation = m_rootPart.RotationOffset; 3052 Quaternion partRotation = m_rootPart.RotationOffset;
@@ -3064,6 +3061,9 @@ namespace OpenSim.Region.Framework.Scenes
3064 } 3061 }
3065 3062
3066 AbsolutePosition = newPos; 3063 AbsolutePosition = newPos;
3064
3065 if (IsAttachment)
3066 m_rootPart.AttachedPos = newPos;
3067 3067
3068 HasGroupChanged = true; 3068 HasGroupChanged = true;
3069 ScheduleGroupForTerseUpdate(); 3069 ScheduleGroupForTerseUpdate();