From 52dd547863c0cdd22f53f0efcaef11ae096855a0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 8 Oct 2010 11:31:52 +0200 Subject: Make SendKillObject send multiple localIDs in one packet. This avoids the halting visual behavior of large group deletes and eliminates the packet flood --- OpenSim/Region/Examples/SimpleModule/ComplexObject.cs | 5 +++-- OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Examples') diff --git a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs index e951bef..7a0ce51 100644 --- a/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs +++ b/OpenSim/Region/Examples/SimpleModule/ComplexObject.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System.Collections.Generic; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; @@ -110,7 +111,7 @@ namespace OpenSim.Region.Examples.SimpleModule { m_parts.Remove(part.UUID); - remoteClient.SendKillObject(m_regionHandle, part.LocalId); + remoteClient.SendKillObject(m_regionHandle, new List() { part.LocalId} ); remoteClient.AddMoney(1); remoteClient.SendChatMessage("Poof!", 1, AbsolutePosition, "Party Party", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); } @@ -121,7 +122,7 @@ namespace OpenSim.Region.Examples.SimpleModule { m_parts.Remove(m_rootPart.UUID); m_scene.DeleteSceneObject(this, false); - remoteClient.SendKillObject(m_regionHandle, m_rootPart.LocalId); + remoteClient.SendKillObject(m_regionHandle, new List() { m_rootPart.LocalId }); remoteClient.AddMoney(50); remoteClient.SendChatMessage("KABLAM!!!", 1, AbsolutePosition, "Groupie Groupie", UUID.Zero, (byte)ChatSourceType.Object, (byte)ChatAudibleLevel.Fully); } diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 944ad94..db427b4 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs @@ -429,7 +429,7 @@ namespace OpenSim.Region.Examples.SimpleModule } - public virtual void SendKillObject(ulong regionHandle, uint localID) + public virtual void SendKillObject(ulong regionHandle, List localID) { } -- cgit v1.1