diff options
author | Oren Hurvitz | 2013-09-16 09:42:14 +0300 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2014-01-10 20:24:11 +0000 |
commit | da47bcae3ec625e7cb8dc1947d1aa39ba7b8ac0f (patch) | |
tree | 023f6a66f22e5ca70a6e3209e258585f61ee75a0 | |
parent | When creating a coalesced object, set its permissions to the lowest-common-de... (diff) | |
download | opensim-SC_OLD-da47bcae3ec625e7cb8dc1947d1aa39ba7b8ac0f.zip opensim-SC_OLD-da47bcae3ec625e7cb8dc1947d1aa39ba7b8ac0f.tar.gz opensim-SC_OLD-da47bcae3ec625e7cb8dc1947d1aa39ba7b8ac0f.tar.bz2 opensim-SC_OLD-da47bcae3ec625e7cb8dc1947d1aa39ba7b8ac0f.tar.xz |
When moving the root prim of an attachment: a) Change the attach position; b) Move the other prims in the reverse direction to compensate
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 10 |
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(); |