From 63d1916f511fdbbec8bc111f4bf80b3e4e0bc267 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 23 Aug 2014 20:59:11 +0100 Subject: Remove entities from updates queues on kill. Do it sync so enqueues after the kill work --- OpenSim/Framework/PriorityQueue.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/PriorityQueue.cs b/OpenSim/Framework/PriorityQueue.cs index d6c39a7..4f05f65 100644 --- a/OpenSim/Framework/PriorityQueue.cs +++ b/OpenSim/Framework/PriorityQueue.cs @@ -134,6 +134,21 @@ namespace OpenSim.Framework return true; } + + public void Remove(List ids) + { + LookupItem lookup; + + foreach (uint localid in ids) + { + if (m_lookupTable.TryGetValue(localid, out lookup)) + { + lookup.Heap.Remove(lookup.Handle); + m_lookupTable.Remove(localid); + } + } + } + /// /// Remove an item from one of the queues. Specifically, it removes the /// oldest item from the next queue in order to provide fair access to -- cgit v1.1