not loading already loaded chunks
This commit is contained in:
@@ -57,8 +57,12 @@ impl World {
|
||||
* Sends chunk position to the ChunkLoader
|
||||
*/
|
||||
pub fn load_chunk(&mut self, pos: Vector3<i32>) {
|
||||
self.loader.load(pos);
|
||||
self.busy += 1;
|
||||
if let Some(chunk) = self.chunks.get_mut(&pos) {
|
||||
chunk.dirty = true;
|
||||
} else {
|
||||
self.loader.load(pos);
|
||||
self.busy += 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user