Endless world, still some bugs to figure out

This commit is contained in:
Piotrek
2021-05-14 19:54:46 +02:00
parent e6329d568c
commit 00c518b9c1
9 changed files with 91 additions and 60 deletions
-2
View File
@@ -53,7 +53,6 @@ impl WorldChunk {
}
// Blocks
let timer = Instant::now();
let mut block_bytes = vec![0_u8; num_blocks*block::SIZE_QB];
lz4::decompress(&block_bytes_compressed, &mut block_bytes[0..num_blocks*block::SIZE_QB]).unwrap();
let block_bytes = Arc::new(block_bytes);
@@ -85,7 +84,6 @@ impl WorldChunk {
blocks.sort_by(|a, b| (*a).0.cmp(&(*b).0));
for b in blocks { instance.blocks.push(b.1); }
println!("Blocks: {} ms, {}", timer.elapsed().as_millis(), instance.blocks.len());
instance
}