From ffc10ea8fc048fa4e680b27ce4eb9a32ba90eb01 Mon Sep 17 00:00:00 2001 From: Isaac Turci <78173025+Zac8668@users.noreply.github.com> Date: Sat, 27 Jan 2024 20:25:55 -0300 Subject: [PATCH] Add four update steps to test --- src/chunk_group.rs | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/chunk_group.rs b/src/chunk_group.rs index 3864742..32b6c18 100644 --- a/src/chunk_group.rs +++ b/src/chunk_group.rs @@ -440,15 +440,19 @@ fn update_test() { let (dirty_render_rects_send, _) = async_channel::unbounded::(); let dirty_render_rect_send = &dirty_render_rects_send; + for (y_toff, x_toff) in rand_range(0..2) + .into_iter() + .cartesian_product(rand_range(0..2).into_iter()) + { - update_chunk_groups( - &mut chunk_manager.chunks, - (0, 0), - &dirty_rects, - manager_pos, - (dirty_update_rect_send, dirty_render_rect_send), - (dt, materials), - - ); + update_chunk_groups( + &mut chunk_manager.chunks, + (x_toff, y_toff), + &dirty_rects, + manager_pos, + (dirty_update_rect_send, dirty_render_rect_send), + (dt, materials), + ); + } }