From 4350a6a3aead4bbff81ae7bf7436880fafd672e3 Mon Sep 17 00:00:00 2001 From: CobaltXII Date: Mon, 31 Dec 2018 16:53:09 -0500 Subject: [PATCH] Natural lighting can now be updated dynamically --- src/inc/accessor.hpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/inc/accessor.hpp b/src/inc/accessor.hpp index 59d6cb5..dbbac10 100644 --- a/src/inc/accessor.hpp +++ b/src/inc/accessor.hpp @@ -90,6 +90,25 @@ struct accessor } } } + + if ((id == id_air) != (old_id == id_air)) + { + // Update lighting. + + propagate_skylight_strip + ( + the_world, + + the_chunks, + + chunk_x_res, + chunk_y_res, + chunk_z_res, + + x, + z + ); + } } };