diff --git a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs index 30acbdf473..cf09cc92ee 100644 --- a/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs @@ -11385,7 +11385,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP { // It's a ghost! tell the client to delete it from view. simClient.SendKillObject(Scene.RegionInfo.RegionHandle, - new List() { localId }); + new List { localId }); } else { diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index f8681e7fa9..3881dcd858 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -548,6 +548,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments if (!silent) { + // Killing it here will cause the client to deselect it + // It then reappears on the avatar, deselected + // through the full update below + // + if (so.IsSelected) + { + m_scene.SendKillObject(new List { so.RootPart.LocalId }); + } + so.IsSelected = false; // fudge.... so.ScheduleGroupForFullUpdate(); } diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index e47d2a70d6..5431841a79 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs @@ -571,7 +571,7 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer protected void KillEntity(Scene scene, uint localID) { - scene.SendKillObject(new List() { localID }); + scene.SendKillObject(new List { localID }); } protected virtual GridRegion GetFinalDestination(GridRegion region) diff --git a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs index 218f2c5eec..5dfd3e027b 100644 --- a/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs +++ b/OpenSim/Region/Framework/Scenes/AsyncSceneObjectGroupDeleter.cs @@ -107,8 +107,7 @@ namespace OpenSim.Region.Framework.Scenes List killIDs = new List(); foreach (SceneObjectGroup g in objectGroups) - { - killIDs.Add(g.LocalId); + { killIDs.Add(g.LocalId); g.DeleteGroupFromScene(true); } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 962e5e12e6..e668790154 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -3230,7 +3230,7 @@ namespace OpenSim.Region.Framework.Scenes delegate(IClientAPI client) { //We can safely ignore null reference exceptions. It means the avatar is dead and cleaned up anyway - try { client.SendKillObject(avatar.RegionHandle, new List() { avatar.LocalId}); } + try { client.SendKillObject(avatar.RegionHandle, new List { avatar.LocalId }); } catch (NullReferenceException) { } }); @@ -3310,11 +3310,7 @@ namespace OpenSim.Region.Framework.Scenes } deleteIDs.Add(localID); } - - ForEachClient(delegate(IClientAPI client) - { - client.SendKillObject(m_regionHandle, deleteIDs); - }); + ForEachClient(delegate(IClientAPI client) { client.SendKillObject(m_regionHandle, deleteIDs); }); } #endregion diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6e20f9024e..a12a17c235 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs @@ -1485,7 +1485,7 @@ namespace OpenSim.Region.Framework.Scenes { if (!IsAttachment || (AttachedAvatar == avatar.ControllingClient.AgentId) || (AttachmentPoint < 31) || (AttachmentPoint > 38)) - avatar.ControllingClient.SendKillObject(m_regionHandle, new List() {part.LocalId}); + avatar.ControllingClient.SendKillObject(m_regionHandle, new List { part.LocalId }); } } });