From eee9c114cbcfdefba2b2edc94d4d174689c5d546 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 3 Sep 2008 19:28:46 +0000 Subject: Mantis #2111 Eliminate gretuitious KillObject packets. KillObject is sent to the viewer for the root part only. Also prevents the full update on deselect that makes a deleted object reappear and stay visible until the background deleter got around to it. We still send 2 KillObject packets for the root prim, that could be avoided only at a cost in reliability. One packet seems an acceptable price to pay for consistency. --- OpenSim/Region/Environment/Scenes/Scene.cs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes/Scene.cs') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 2b242fc..45062eb 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -2496,6 +2496,15 @@ namespace OpenSim.Region.Environment.Scenes public void SendKillObject(uint localID) { + SceneObjectPart part = GetSceneObjectPart(localID); + if (part != null) // It is a prim + { + if (part.ParentGroup != null && part.ParentGroup.RootPart != null) // Valid + { + if (part.ParentGroup.RootPart != part) // Child part + return; + } + } Broadcast(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, localID); }); } -- cgit v1.1