diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneGraph.cs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 24d7334..032c859 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -259,7 +259,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
259 | protected internal bool AddRestoredSceneObject( | 259 | protected internal bool AddRestoredSceneObject( |
260 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates) | 260 | SceneObjectGroup sceneObject, bool attachToBackup, bool alreadyPersisted, bool sendClientUpdates) |
261 | { | 261 | { |
262 | if (!alreadyPersisted) | 262 | if (attachToBackup && (!alreadyPersisted)) |
263 | { | 263 | { |
264 | sceneObject.ForceInventoryPersistence(); | 264 | sceneObject.ForceInventoryPersistence(); |
265 | sceneObject.HasGroupChanged = true; | 265 | sceneObject.HasGroupChanged = true; |
@@ -282,8 +282,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
282 | /// </returns> | 282 | /// </returns> |
283 | protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) | 283 | protected internal bool AddNewSceneObject(SceneObjectGroup sceneObject, bool attachToBackup, bool sendClientUpdates) |
284 | { | 284 | { |
285 | // Ensure that we persist this new scene object | 285 | // Ensure that we persist this new scene object if it's not an |
286 | sceneObject.HasGroupChanged = true; | 286 | // attachment |
287 | if (attachToBackup) | ||
288 | sceneObject.HasGroupChanged = true; | ||
287 | 289 | ||
288 | return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates); | 290 | return AddSceneObject(sceneObject, attachToBackup, sendClientUpdates); |
289 | } | 291 | } |
@@ -1279,8 +1281,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
1279 | { | 1281 | { |
1280 | if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) | 1282 | if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) |
1281 | { | 1283 | { |
1282 | if (m_parentScene.AttachmentsModule != null) | 1284 | // Set the new attachment point data in the object |
1283 | m_parentScene.AttachmentsModule.UpdateAttachmentPosition(remoteClient, group, pos); | 1285 | byte attachmentPoint = group.GetAttachmentPoint(); |
1286 | group.UpdateGroupPosition(pos); | ||
1287 | group.RootPart.IsAttachment = false; | ||
1288 | group.AbsolutePosition = group.RootPart.AttachedPos; | ||
1289 | group.SetAttachmentPoint(attachmentPoint); | ||
1290 | group.HasGroupChanged = true; | ||
1284 | } | 1291 | } |
1285 | else | 1292 | else |
1286 | { | 1293 | { |