mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-12-25 05:08:21 -06:00
slow down chunk ops while loading
This commit is contained in:
parent
41d7803a64
commit
1c2557d83f
|
@ -14,8 +14,8 @@ use super::{
|
|||
tasks::{ChunkTaskManager, ChunkTaskResponse, ChunkTask},
|
||||
};
|
||||
|
||||
//todo limit task starts insted
|
||||
const MAX_CHUNK_OPS: usize = 8;
|
||||
const MAX_CHUNK_OPS_INGAME: usize = 6;
|
||||
const MAX_CHUNK_OPS: usize = 32;
|
||||
|
||||
pub fn update_loaded_world_around_player() -> Workload {
|
||||
(
|
||||
|
@ -233,8 +233,9 @@ fn process_completed_tasks(
|
|||
ops += 1;
|
||||
}
|
||||
}
|
||||
if (ops >= MAX_CHUNK_OPS) && matches!(*state, GameState::InGame) {
|
||||
break
|
||||
}
|
||||
if ops >= match *state {
|
||||
GameState::InGame => MAX_CHUNK_OPS_INGAME,
|
||||
_ => MAX_CHUNK_OPS,
|
||||
} { break }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue