mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
Iteration order fix x2
This commit is contained in:
parent
7c6fe69922
commit
0513a41981
@ -54,8 +54,8 @@ fn calc_light<V: RectRasterableVol<Vox = Block> + ReadVol + Debug>(
|
||||
|
||||
let mut light_map = vec![UNKNOWN; outer.size().product() as usize];
|
||||
let lm_idx = {
|
||||
let (_, h, d) = outer.clone().size().into_tuple();
|
||||
move |x, y, z| (h * d * x + d * y + z) as usize
|
||||
let (w, h, _) = outer.clone().size().into_tuple();
|
||||
move |x, y, z| (w * h * z + h * x + y) as usize
|
||||
};
|
||||
// Light propagation queue
|
||||
let mut prop_que = lit_blocks
|
||||
@ -217,8 +217,8 @@ fn calc_light<V: RectRasterableVol<Vox = Block> + ReadVol + Debug>(
|
||||
// for blocks outside of the chunk borders.
|
||||
let mut light_map2 = vec![UNKNOWN; min_bounds.size().product() as usize];
|
||||
let lm_idx2 = {
|
||||
let (_, h, d) = min_bounds.clone().size().into_tuple();
|
||||
move |x, y, z| (h * d * x + d * y + z) as usize
|
||||
let (w, h, _) = min_bounds.clone().size().into_tuple();
|
||||
move |x, y, z| (w * h * z + h * x + y) as usize
|
||||
};
|
||||
for x in 0..min_bounds.size().w {
|
||||
for y in 0..min_bounds.size().h {
|
||||
|
Loading…
x
Reference in New Issue
Block a user