diff --git a/src/map.rs b/src/map.rs index 0a83468..55313f9 100644 --- a/src/map.rs +++ b/src/map.rs @@ -266,9 +266,10 @@ impl StreamableMap{ read_texture(&mut self.file,block_id) } pub fn into_complete_map(mut self)->Result{ - //count on reading the file in sequential order being fastest - let mut block_ids=std::collections::BinaryHeap::new(); + let mut block_ids=Vec::new(); self.bvh.into_visitor(&mut |block_id|block_ids.push(block_id)); + //count on reading the file in sequential order being fastest + block_ids.sort_unstable(); //load all regions let mut model_pairs=HashMap::new(); for block_id in block_ids{