From dac3c10aee44b2c749aa0bb615431c51c0d35e3a Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Fri, 3 May 2024 23:43:01 +0200 Subject: [PATCH] fix mesh not updating --- kubi/src/world/loading.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kubi/src/world/loading.rs b/kubi/src/world/loading.rs index ea29999..aa0d774 100644 --- a/kubi/src/world/loading.rs +++ b/kubi/src/world/loading.rs @@ -110,7 +110,9 @@ fn process_state_changes( continue } // If the chunk is already in the desired state, skip it - if chunk.desired_state.matches_current(chunk.current_state) { + // (except one annoying edge case where chunk is rendered but dirty, then we need to recalculate the mesh) + if chunk.desired_state.matches_current(chunk.current_state) && + !(chunk.desired_state == DesiredChunkState::Rendered && chunk.mesh_dirty) { continue } match chunk.desired_state {