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