From 80b84e4bad9c468763d42feaa7e75146dc320f66 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 8 Dec 2010 00:08:14 +0100 Subject: [PATCH] Prevent sending of attachment data to any client if the attachment is not actually attached to any avatar. Another stab ad fixing "HUD hair" --- .../ClientStack/LindenUDP/LLClientView.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index f9e1e2171e..246aaf0054 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -3615,6 +3615,27 @@ namespace OpenSim.Region.ClientStack.LindenUDP if (part.ParentGroup.OwnerID != AgentId && part.ParentGroup.RootPart.Shape.State >= 30) continue; + ScenePresence sp; + // Owner is not in the sim, don't update it to + // anyone + if (!m_scene.TryGetScenePresence(part.OwnerID, out sp)) + continue; + + List atts = sp.Attachments; + bool found = false; + foreach (SceneObjectGroup att in atts) + { + if (att == part.ParentGroup) + { + found = true; + break; + } + } + + // It's an attachment of a valid avatar, but + // doesn't seem to be attached, skip + if (!found) + continue; } if (part.ParentGroup.IsAttachment && m_disableFacelights)