mirror of
https://github.com/griffi-gh/kubi.git
synced 2024-11-25 16:28:42 -06:00
"unroll" loop
This commit is contained in:
parent
dc0c314bf5
commit
0a528d8ccf
|
@ -37,8 +37,11 @@ pub fn mark_chunks(
|
|||
for y in -load_distance..=load_distance {
|
||||
for z in -load_distance..=load_distance {
|
||||
let chunk_pos_offset = ivec3(x, y, z);
|
||||
let is_border = chunk_pos_offset.to_array()
|
||||
.iter().any(|x| x.abs() == load_distance);
|
||||
let is_border = {
|
||||
chunk_pos_offset.x.abs() == load_distance ||
|
||||
chunk_pos_offset.y.abs() == load_distance ||
|
||||
chunk_pos_offset.z.abs() == load_distance
|
||||
};
|
||||
let desired = match is_border {
|
||||
true => ChunkState::Loaded,
|
||||
false => ChunkState::Rendered,
|
||||
|
|
Loading…
Reference in a new issue