From e5b739aaebace6b028f3f6bf05d21ff7a7c5affe Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Mon, 25 Jun 2012 22:48:13 +0100
Subject: When attachments are being saved and deleted for a closing root
agent, delete first to avoid a hud race condition with update threads.
If delete doesn't occur first then the update thread can outrace the IsAttachment = false necessary to save attachments and send hud artifacts to other viewers.
---
OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs')
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index eb07165..fde5de1 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -43,10 +43,15 @@ namespace OpenSim.Region.Framework.Interfaces
void RezAttachments(IScenePresence sp);
///
- /// Save the attachments that have change on this presence.
+ /// Derez the attachements for a scene presence that is closing.
///
- ///
- void SaveChangedAttachments(IScenePresence sp, bool saveAllScripted);
+ ///
+ /// Attachment changes are saved.
+ ///
+ /// The presence closing
+ /// Save changed attachments.
+ /// Save attachments with scripts even if they haven't changed.
+ void DeRezAttachments(IScenePresence sp, bool saveChanged, bool saveAllScripted);
///
/// Delete all the presence's attachments from the scene
--
cgit v1.1
From d0432133172f4147f7401f214c703611978423cd Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 27 Jun 2012 00:41:46 +0100
Subject: refactor: Move ScenePresence <-> AgentData attachments copying code
into AttachmentsModule.
---
OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 14 ++++++++++++++
1 file changed, 14 insertions(+)
(limited to 'OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs')
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index fde5de1..375d334 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -36,6 +36,20 @@ namespace OpenSim.Region.Framework.Interfaces
public interface IAttachmentsModule
{
///
+ /// Copy attachment data from a ScenePresence into the AgentData structure for transmission to another simulator
+ ///
+ ///
+ ///
+ void CopyAttachments(IScenePresence sp, AgentData ad);
+
+ ///
+ /// Copy attachment data from an AgentData structure into a ScenePresence.
+ ///
+ ///
+ ///
+ void CopyAttachments(AgentData ad, IScenePresence sp);
+
+ ///
/// RezAttachments. This should only be called upon login on the first region.
/// Attachment rezzings on crossings and TPs are done in a different way.
///
--
cgit v1.1
From bfa6896678872a4e796ec4de22e83b6cead3ba17 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 28 Jun 2012 23:31:23 +0100
Subject: Change AttachmentsModule.DetachSingleAttachmentToInv() to accept a
SOG directly instead of an item ID to then shuffle through attachments,
saving CPU busywork.
Almost all callers already had the sog to hand.
Still checking that it's really an attachment, but now by inspecting SOG.AttachedAvatar
---
OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
(limited to 'OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs')
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index 375d334..ba35a41 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -109,11 +109,11 @@ namespace OpenSim.Region.Framework.Interfaces
void DetachSingleAttachmentToGround(IScenePresence sp, uint objectLocalID);
///
- /// Detach the given item so that it remains in the user's inventory.
+ /// Detach the given attachment so that it remains in the user's inventory.
///
/// /param>
- ///
- void DetachSingleAttachmentToInv(IScenePresence sp, UUID itemID);
+ /// The attachment to detach.
+ void DetachSingleAttachmentToInv(IScenePresence sp, SceneObjectGroup grp);
///
/// Update the position of an attachment.
--
cgit v1.1
From fc2456320646df66b95a06d4cd292c3b2385a8ea Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 11 Jul 2012 21:43:35 +0100
Subject: Add regression TestDetachScriptedAttachmentToInventory()
This currently only does a relatively crude check for a ScriptState node in the serialized xml
---
OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs')
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index ba35a41..351e603 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -92,7 +92,7 @@ namespace OpenSim.Region.Framework.Interfaces
///
///
/// The scene object that was attached. Null if the scene object could not be found
- ISceneEntity RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt);
+ SceneObjectGroup RezSingleAttachmentFromInventory(IScenePresence sp, UUID itemID, uint AttachmentPt);
///
/// Rez multiple attachments from a user's inventory
--
cgit v1.1