From 4b979362e9076344c9e96698f6cf8605945ffe61 Mon Sep 17 00:00:00 2001
From: Melanie
Date: Sat, 4 Dec 2010 14:41:57 +0100
Subject: Add some safeguards: DOn't send someone else's HUDs, don't send
 deleted prims Removed some unneccessarily wordy core comments

---
 .../Region/ClientStack/LindenUDP/LLClientView.cs   | 25 +++++++++-------------
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 9189260..478cfe6 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -3604,24 +3604,19 @@ namespace OpenSim.Region.ClientStack.LindenUDP
                         if (m_killRecord.Contains(part.ParentGroup.RootPart.LocalId))
                             continue;
 
-                        // Please do not remove this unless you can demonstrate on the OpenSim mailing list that a client
-                        // will never receive an update after a prim kill.  Even then, keeping the kill record may be a good
-                        // safety measure.
-                        //
-                        // If a Linden Lab 1.23.5 client (and possibly later and earlier) receives an object update
-                        // after a kill, it will keep displaying the deleted object until relog.  OpenSim currently performs
-                        // updates and kills on different threads with different scheduling strategies, hence this protection.
-                        // 
-                        // This doesn't appear to apply to child prims - a client will happily ignore these updates
-                        // after the root prim has been deleted.
                         if (m_killRecord.Contains(part.LocalId))
-                        {
-        //                        m_log.WarnFormat(
-        //                            "[CLIENT]: Preventing update for prim with local id {0} after client for user {1} told it was deleted",
-        //                            part.LocalId, Name);
                             continue;
-                        }                        
                         
+                        if (part.ParentGroup.IsDeleted)
+                            continue;
+
+                        if (part.ParentGroup.IsAttachment)
+                        {   // Someone else's HUD, why are we getting these?
+                            if (part.ParentGroup.OwnerID != AgentId &&
+                                part.ParentGroup.RootPart.Shape.State >= 30)
+                                continue;
+                        }
+
                         if (part.ParentGroup.IsAttachment && m_disableFacelights)
                         {
                             if (part.ParentGroup.RootPart.Shape.State != (byte)AttachmentPoint.LeftHand &&
-- 
cgit v1.1