aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs17
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index a462133..b2d9358 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -281,7 +281,7 @@ namespace OpenSim.Region.Framework.Scenes
281 } 281 }
282 } 282 }
283 283
284 if (!alreadyPersisted) 284 if (attachToBackup && (!alreadyPersisted))
285 { 285 {
286 sceneObject.ForceInventoryPersistence(); 286 sceneObject.ForceInventoryPersistence();
287 sceneObject.HasGroupChanged = true; 287 sceneObject.HasGroupChanged = true;
@@ -304,8 +304,10 @@ namespace OpenSim.Region.Framework.Scenes
304 /// </returns> 304 /// </returns>
305 protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) 305 protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates)
306 { 306 {
307 // Ensure that we persist this new scene object 307 // Ensure that we persist this new scene object if it's not an
308 sceneObject.HasGroupChanged = true; 308 // attachment
309 if (attachToBackup)
310 sceneObject.HasGroupChanged = true;
309 311
310 return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates); 312 return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates);
311 } 313 }
@@ -1342,8 +1344,13 @@ namespace OpenSim.Region.Framework.Scenes
1342 { 1344 {
1343 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) 1345 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
1344 { 1346 {
1345 if (m_parentScene.AttachmentsModule != null) 1347 // Set the new attachment point data in the object
1346 m_parentScene.AttachmentsModule.UpdateAttachmentPosition(remoteClient, group, pos); 1348 byte attachmentPoint = group.GetAttachmentPoint();
1349 group.UpdateGroupPosition(pos);
1350 group.RootPart.IsAttachment = false;
1351 group.AbsolutePosition = group.RootPart.AttachedPos;
1352 group.SetAttachmentPoint(attachmentPoint);
1353 group.HasGroupChanged = true;
1347 } 1354 }
1348 else 1355 else
1349 { 1356 {