diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index c34b6b5c4b..68e8f650c5 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -3725,8 +3725,6 @@ namespace OpenSim.Region.ClientStack.LindenUDP } } - ++updatesThisCall; - #region UpdateFlags to packet type conversion PrimUpdateFlags updateFlags = (PrimUpdateFlags)update.Flags; @@ -3791,7 +3789,15 @@ namespace OpenSim.Region.ClientStack.LindenUDP } else { - updateBlock = CreatePrimUpdateBlock((SceneObjectPart)update.Entity, AgentId); + SceneObjectPart part = (SceneObjectPart)update.Entity; + updateBlock = CreatePrimUpdateBlock(part, AgentId); + + // If the part has become a private hud since the update was scheduled then we do not + // want to send it to other avatars. + if (part.ParentGroup.IsAttachment + && part.ParentGroup.HasPrivateAttachmentPoint + && part.ParentGroup.AttachedAvatar != AgentId) + continue; } objectUpdateBlocks.Value.Add(updateBlock); @@ -3814,6 +3820,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // Everything else goes here terseUpdateBlocks.Value.Add(CreateImprovedTerseBlock(update.Entity, updateFlags.HasFlag(PrimUpdateFlags.Textures))); + + if (update.Entity is SceneObjectPart) + { + SceneObjectPart part = (SceneObjectPart)update.Entity; + + // If the part has become a private hud since the update was scheduled then we do not + // want to send it to other avatars. + if (part.ParentGroup.IsAttachment + && part.ParentGroup.HasPrivateAttachmentPoint + && part.ParentGroup.AttachedAvatar != AgentId) + continue; + } + terseUpdates.Value.Add(update); } } @@ -3883,6 +3902,8 @@ namespace OpenSim.Region.ClientStack.LindenUDP // If any of the packets created from this call go unacknowledged, all of the updates will be resent OutPacket(packet, ThrottleOutPacketType.Task, true, delegate(OutgoingPacket oPacket) { ResendPrimUpdates(terseUpdates.Value, oPacket); }); } + + ++updatesThisCall; } #endregion Packet Sending