diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index 2e58a46..4526a59 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -3746,5 +3746,28 @@ 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.RootPart.IsAttachment = false; | ||
3763 | grp.AbsolutePosition = grp.RootPart.AttachedPos; | ||
3764 | // grp.DetachToInventoryPrep(); | ||
3765 | attachmentsModule.UpdateKnownItem(ControllingClient, | ||
3766 | grp, grp.GetFromItemID(), grp.OwnerID); | ||
3767 | grp.RootPart.IsAttachment = true; | ||
3768 | } | ||
3769 | } | ||
3770 | } | ||
3771 | } | ||
3749 | } | 3772 | } |
3750 | } | 3773 | } |