diff --git a/code/__HELPERS/heap.dm b/code/__HELPERS/heap.dm index ce03b482e5..c34d5a2b9e 100644 --- a/code/__HELPERS/heap.dm +++ b/code/__HELPERS/heap.dm @@ -38,6 +38,7 @@ while(parent > 0 && (call(cmp)(L[index],L[parent]) > 0)) L.Swap(index,parent) + index = parent parent = round(index * 0.5) @@ -67,7 +68,6 @@ //Replaces a given node so it verify the heap condition /datum/Heap/proc/ReSort(atom/A) var/index = L.Find(A) - Swim(index) Sink(index)