From 57e5aa662851485902575c3c747437e365bf72c8 Mon Sep 17 00:00:00 2001 From: Dániel Juhász Date: Sat, 11 Mar 2017 17:07:04 +0100 Subject: Light update for map blocks This is not really different from the light update of a voxel manipulator. This update does not assume that the lighting was correct before, therefore it is useful for correction. Also expose this function to the Lua API for light correction, and allow voxel manipulators not to update the light. --- src/voxelalgorithms.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/voxelalgorithms.h') diff --git a/src/voxelalgorithms.h b/src/voxelalgorithms.h index cdffe86c8..b518979d7 100644 --- a/src/voxelalgorithms.h +++ b/src/voxelalgorithms.h @@ -97,6 +97,15 @@ void update_block_border_lighting(Map *map, MapBlock *block, void blit_back_with_light(ServerMap *map, MMVManip *vm, std::map *modified_blocks); +/*! + * Corrects the light in a map block. + * For server use only. + * + * \param block the block to update + */ +void repair_block_light(ServerMap *map, MapBlock *block, + std::map *modified_blocks); + /*! * This class iterates trough voxels that intersect with * a line. The collision detection does not see nodeboxes, -- cgit v1.2.3