aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.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/ScenePresence.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/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs20
1 files changed, 20 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 34d1c39..bfc1bd6 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3746,5 +3746,25 @@ namespace OpenSim.Region.Framework.Scenes
3746 m_reprioritization_called = false; 3746 m_reprioritization_called = false;
3747 } 3747 }
3748 } 3748 }
3749
3750 public void SaveChangedAttachments()
3751 {
3752 // Need to copy this list because DetachToInventoryPrep mods it
3753 List<SceneObjectGroup> attachments = new List<SceneObjectGroup>(Attachments.ToArray());
3754
3755 IAttachmentsModule attachmentsModule = m_scene.AttachmentsModule;
3756 if (attachmentsModule != null)
3757 {
3758 foreach (SceneObjectGroup grp in attachments)
3759 {
3760 if (grp.HasGroupChanged) // Resizer scripts?
3761 {
3762 grp.DetachToInventoryPrep();
3763 attachmentsModule.UpdateKnownItem(ControllingClient,
3764 grp, grp.GetFromItemID(), grp.OwnerID);
3765 }
3766 }
3767 }
3768 }
3749 } 3769 }
3750} 3770}