aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-06-25 21:08:19 +0100
committerJustin Clark-Casey (justincc)2012-06-25 21:08:19 +0100
commit5301648cff6b451fef4cca0baf8cda1bdb1455a6 (patch)
tree2877e517397265037c0342570a75757dc9462be0 /OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
parentFix script "Running" behavior (diff)
downloadopensim-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/ClientStack/Linden/UDP/LLClientView.cs')
-rw-r--r--OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs33
1 files changed, 32 insertions, 1 deletions
diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
index 4cb7a3a..8874585 100644
--- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs
@@ -3808,6 +3808,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3808 && part.ParentGroup.HasPrivateAttachmentPoint 3808 && part.ParentGroup.HasPrivateAttachmentPoint
3809 && part.ParentGroup.AttachedAvatar != AgentId) 3809 && part.ParentGroup.AttachedAvatar != AgentId)
3810 continue; 3810 continue;
3811
3812 // If the part has since been deleted, then drop the update. In the case of attachments,
3813 // this is to avoid spurious updates to other viewers since post-processing of attachments
3814 // has to change the IsAttachment flag for various reasons (which will end up in a pass
3815 // of the test above).
3816 //
3817 // Actual deletions (kills) happen in another method.
3818 if (part.ParentGroup.IsDeleted)
3819 continue;
3811 } 3820 }
3812 3821
3813 objectUpdateBlocks.Value.Add(updateBlock); 3822 objectUpdateBlocks.Value.Add(updateBlock);
@@ -3815,7 +3824,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3815 } 3824 }
3816 else if (!canUseImproved) 3825 else if (!canUseImproved)
3817 { 3826 {
3818 compressedUpdateBlocks.Value.Add(CreateCompressedUpdateBlock((SceneObjectPart)update.Entity, updateFlags)); 3827 SceneObjectPart part = (SceneObjectPart)update.Entity;
3828 ObjectUpdateCompressedPacket.ObjectDataBlock compressedBlock
3829 = CreateCompressedUpdateBlock(part, updateFlags);
3830
3831 // If the part has since been deleted, then drop the update. In the case of attachments,
3832 // this is to avoid spurious updates to other viewers since post-processing of attachments
3833 // has to change the IsAttachment flag for various reasons (which will end up in a pass
3834 // of the test above).
3835 //
3836 // Actual deletions (kills) happen in another method.
3837 if (part.ParentGroup.IsDeleted)
3838 continue;
3839
3840 compressedUpdateBlocks.Value.Add(compressedBlock);
3819 compressedUpdates.Value.Add(update); 3841 compressedUpdates.Value.Add(update);
3820 } 3842 }
3821 else 3843 else
@@ -3842,6 +3864,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP
3842 && part.ParentGroup.HasPrivateAttachmentPoint 3864 && part.ParentGroup.HasPrivateAttachmentPoint
3843 && part.ParentGroup.AttachedAvatar != AgentId) 3865 && part.ParentGroup.AttachedAvatar != AgentId)
3844 continue; 3866 continue;
3867
3868 // If the part has since been deleted, then drop the update. In the case of attachments,
3869 // this is to avoid spurious updates to other viewers since post-processing of attachments
3870 // has to change the IsAttachment flag for various reasons (which will end up in a pass
3871 // of the test above).
3872 //
3873 // Actual deletions (kills) happen in another method.
3874 if (part.ParentGroup.IsDeleted)
3875 continue;
3845 } 3876 }
3846 3877
3847 terseUpdateBlocks.Value.Add(terseUpdateBlock); 3878 terseUpdateBlocks.Value.Add(terseUpdateBlock);