diff options
author | Justin Clark-Casey (justincc) | 2012-06-25 21:08:19 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-25 21:08:19 +0100 |
commit | 5301648cff6b451fef4cca0baf8cda1bdb1455a6 (patch) | |
tree | 2877e517397265037c0342570a75757dc9462be0 /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |
parent | Fix script "Running" behavior (diff) | |
download | opensim-SC_OLD-5301648cff6b451fef4cca0baf8cda1bdb1455a6.zip opensim-SC_OLD-5301648cff6b451fef4cca0baf8cda1bdb1455a6.tar.gz opensim-SC_OLD-5301648cff6b451fef4cca0baf8cda1bdb1455a6.tar.bz2 opensim-SC_OLD-5301648cff6b451fef4cca0baf8cda1bdb1455a6.tar.xz |
In AttachmentsModule.DetachSingleAttachmentToInvInternal(), remove attachment before changing properties for correct inventory serialization.
Serialization of attachments requires IsAttachment = false so that correct positions are serialized instead of avatar position.
However, doing this when a hud is still attached allows race conditions with update threads, resulting in hud artifacts on other viewers.
This change sets SOG.IsDeleted before serialization changes take place (IsDeleted itself is not a serialized property).
LLClientView then screens out any deleted SOGs before sending updates to viewers.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index a2b95eb..99e0153 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -628,6 +628,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
628 | { | 628 | { |
629 | m_scene.EventManager.TriggerOnAttach(group.LocalId, itemID, UUID.Zero); | 629 | m_scene.EventManager.TriggerOnAttach(group.LocalId, itemID, UUID.Zero); |
630 | sp.RemoveAttachment(group); | 630 | sp.RemoveAttachment(group); |
631 | m_scene.DeleteSceneObject(group, false); | ||
631 | 632 | ||
632 | // Prepare sog for storage | 633 | // Prepare sog for storage |
633 | group.AttachedAvatar = UUID.Zero; | 634 | group.AttachedAvatar = UUID.Zero; |
@@ -636,7 +637,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
636 | group.AbsolutePosition = group.RootPart.AttachedPos; | 637 | group.AbsolutePosition = group.RootPart.AttachedPos; |
637 | 638 | ||
638 | UpdateKnownItem(sp, group, true); | 639 | UpdateKnownItem(sp, group, true); |
639 | m_scene.DeleteSceneObject(group, false); | ||
640 | 640 | ||
641 | return; | 641 | return; |
642 | } | 642 | } |