diff options
author | Justin Clark-Casey (justincc) | 2010-11-17 01:28:46 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-11-17 01:28:46 +0000 |
commit | b38a1594c1028ed39def8079043ae19ebc28b813 (patch) | |
tree | 962ee7f2584dead0ffa37cf1c8b3535a3626a26b /OpenSim/Region/Framework/Scenes/SceneGraph.cs | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
parent | Prevent leftover attachments from clogging up the pipes (diff) | |
download | opensim-SC-b38a1594c1028ed39def8079043ae19ebc28b813.zip opensim-SC-b38a1594c1028ed39def8079043ae19ebc28b813.tar.gz opensim-SC-b38a1594c1028ed39def8079043ae19ebc28b813.tar.bz2 opensim-SC-b38a1594c1028ed39def8079043ae19ebc28b813.tar.xz |
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
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 | { |