aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorMelanie2010-11-16 21:01:56 +0000
committerMelanie2010-11-16 21:01:56 +0000
commit7bb005b0d1a5ae63ca94a3a3f8ad98e0388ea76b (patch)
treeb73a2aa9f04e9c34281fb38512da3eb800396769 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentFix osTeleportAgent for hypergrid destinations. (diff)
downloadopensim-SC_OLD-7bb005b0d1a5ae63ca94a3a3f8ad98e0388ea76b.zip
opensim-SC_OLD-7bb005b0d1a5ae63ca94a3a3f8ad98e0388ea76b.tar.gz
opensim-SC_OLD-7bb005b0d1a5ae63ca94a3a3f8ad98e0388ea76b.tar.bz2
opensim-SC_OLD-7bb005b0d1a5ae63ca94a3a3f8ad98e0388ea76b.tar.xz
Change the way attachments are persisted. Editing a worn attachment will now
save properly, as will the results of a resizer script working. Attachment positions are no longer saved on each move, but instead are saved once on logout. Attachment script states are saved as part of the attachment now when detaching.
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 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 {