aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2014-09-29 23:16:01 +0100
committerJustin Clark-Casey (justincc)2014-10-02 22:30:44 +0100
commit2a9528fa225214557dac59fb9259086c5d99fbb6 (patch)
tree987f79be5b0972857ca468ecb3e4cdd1756ccb17 /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
parentDo not add attachments to the region scene object backup list. (diff)
downloadopensim-SC-2a9528fa225214557dac59fb9259086c5d99fbb6.zip
opensim-SC-2a9528fa225214557dac59fb9259086c5d99fbb6.tar.gz
opensim-SC-2a9528fa225214557dac59fb9259086c5d99fbb6.tar.bz2
opensim-SC-2a9528fa225214557dac59fb9259086c5d99fbb6.tar.xz
Don't unnecessarily remove from backup objects that were not directly attached from the scene.
These are never in region backup in the first place since recent 11830c43 Extend regression test to check backup status.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 7333769..609c559 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -387,7 +387,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
387 if (!Enabled) 387 if (!Enabled)
388 return false; 388 return false;
389 389
390 return AttachObjectInternal(sp, group, attachmentPt, silent, addToInventory, false, append); 390 group.DetachFromBackup();
391
392 bool success = AttachObjectInternal(sp, group, attachmentPt, silent, addToInventory, false, append);
393
394 if (!success)
395 group.AttachToBackup();
396
397 return success;
391 } 398 }
392 399
393 /// <summary> 400 /// <summary>
@@ -815,8 +822,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
815 "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}", 822 "[ATTACHMENTS MODULE]: Adding attachment {0} to avatar {1} in pt {2} pos {3} {4}",
816 so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos); 823 so.Name, sp.Name, attachmentpoint, attachOffset, so.RootPart.AttachedPos);
817 824
818 so.DetachFromBackup();
819
820 // Remove from database and parcel prim count 825 // Remove from database and parcel prim count
821 m_scene.DeleteFromStorage(so.UUID); 826 m_scene.DeleteFromStorage(so.UUID);
822 m_scene.EventManager.TriggerParcelPrimCountTainted(); 827 m_scene.EventManager.TriggerParcelPrimCountTainted();