not loading already loaded chunks
This commit is contained in:
1 parent
5266b32823
commit
65bacd745e
1 file changed
+6
-2
@@ -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