diff options
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r-- | src/client/client.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp index 8ab96b7d1..e078dc530 100644 --- a/src/client/client.cpp +++ b/src/client/client.cpp @@ -530,6 +530,7 @@ void Client::step(float dtime) { int num_processed_meshes = 0; std::vector<v3s16> blocks_to_ack; + bool force_update_shadows = false; while (!m_mesh_update_thread.m_queue_out.empty()) { num_processed_meshes++; @@ -556,9 +557,11 @@ void Client::step(float dtime) if (is_empty) delete r.mesh; - else + else { // Replace with the new mesh block->mesh = r.mesh; + force_update_shadows = true; + } } } else { delete r.mesh; @@ -583,6 +586,10 @@ void Client::step(float dtime) if (num_processed_meshes > 0) g_profiler->graphAdd("num_processed_meshes", num_processed_meshes); + + auto shadow_renderer = RenderingEngine::get_shadow_renderer(); + if (shadow_renderer && force_update_shadows) + shadow_renderer->setForceUpdateShadowMap(); } /* |