diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 44c476c..c6b98ca 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -109,6 +109,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
109 | STATUS_ROTATE_Z = 0x008, | 109 | STATUS_ROTATE_Z = 0x008, |
110 | } | 110 | } |
111 | 111 | ||
112 | // This flag has the same purpose as InventoryItemFlags.ObjectSlamPerm | ||
113 | public static readonly uint SLAM = 16; | ||
114 | |||
112 | // private PrimCountTaintedDelegate handlerPrimCountTainted = null; | 115 | // private PrimCountTaintedDelegate handlerPrimCountTainted = null; |
113 | 116 | ||
114 | /// <summary> | 117 | /// <summary> |
@@ -3230,13 +3233,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
3230 | 3233 | ||
3231 | Vector3 oldPos; | 3234 | Vector3 oldPos; |
3232 | 3235 | ||
3233 | // FIXME: This improves the situation where editing just the root prim of an attached object would send | ||
3234 | // all the other parts to oblivion after detach/reattach. However, a problem remains since the root prim | ||
3235 | // still ends up in the wrong position on reattach. | ||
3236 | if (IsAttachment) | 3236 | if (IsAttachment) |
3237 | oldPos = RootPart.OffsetPosition; | 3237 | oldPos = m_rootPart.AttachedPos + m_rootPart.OffsetPosition; // OffsetPosition should always be 0 in an attachments's root prim |
3238 | else | 3238 | else |
3239 | oldPos = AbsolutePosition + RootPart.OffsetPosition; | 3239 | oldPos = AbsolutePosition + m_rootPart.OffsetPosition; |
3240 | 3240 | ||
3241 | Vector3 diff = oldPos - newPos; | 3241 | Vector3 diff = oldPos - newPos; |
3242 | Quaternion partRotation = m_rootPart.RotationOffset; | 3242 | Quaternion partRotation = m_rootPart.RotationOffset; |
@@ -3251,6 +3251,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
3251 | } | 3251 | } |
3252 | 3252 | ||
3253 | AbsolutePosition = newPos; | 3253 | AbsolutePosition = newPos; |
3254 | |||
3255 | if (IsAttachment) | ||
3256 | m_rootPart.AttachedPos = newPos; | ||
3254 | 3257 | ||
3255 | HasGroupChanged = true; | 3258 | HasGroupChanged = true; |
3256 | ScheduleGroupForTerseUpdate(); | 3259 | ScheduleGroupForTerseUpdate(); |