From 927561383ec2f0e0a4839837d5896ec49b84aa42 Mon Sep 17 00:00:00 2001 From: Snoopy Pfeffer Date: Sun, 6 Nov 2011 17:43:39 +0100 Subject: HUD attachments: Removes some more messages sent to wrong clients. --- OpenSim/Region/Framework/Scenes/Scene.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 1e111e5..5465ca4 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3164,16 +3164,25 @@ namespace OpenSim.Region.Framework.Scenes public void SendKillObject(uint localID) { SceneObjectPart part = GetSceneObjectPart(localID); + UUID attachedAvatar = UUID.Zero; + if (part != null) // It is a prim { if (!part.ParentGroup.IsDeleted) // Valid { if (part.ParentGroup.RootPart != part) // Child part return; + + if (part.ParentGroup.IsAttachment && part.ParentGroup.AttachmentPoint >= 31 && part.ParentGroup.AttachmentPoint <= 38) + attachedAvatar = part.ParentGroup.AttachedAvatar; } } - ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); }); + ForEachClient(delegate(IClientAPI client) + { + if (attachedAvatar == UUID.Zero || attachedAvatar == client.AgentId) + client.SendKillObject(m_regionHandle, localID); + }); } #endregion -- cgit v1.1