diff options
author | Dániel Juhász <juhdanad@gmail.com> | 2017-03-11 17:07:04 +0100 |
---|---|---|
committer | Ekdohibs <nathanael.courant@laposte.net> | 2017-04-20 05:39:14 +0200 |
commit | 57e5aa662851485902575c3c747437e365bf72c8 (patch) | |
tree | 3e8469a85db5577140110e5d87a98514f5dd8d2f /src/voxelalgorithms.h | |
parent | 6d1e6f889826a5802e17f53f99000a51b2e00066 (diff) | |
download | minetest-57e5aa662851485902575c3c747437e365bf72c8.tar.gz minetest-57e5aa662851485902575c3c747437e365bf72c8.tar.bz2 minetest-57e5aa662851485902575c3c747437e365bf72c8.zip |
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.
Diffstat (limited to 'src/voxelalgorithms.h')
-rw-r--r-- | src/voxelalgorithms.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/voxelalgorithms.h b/src/voxelalgorithms.h index cdffe86c8..b518979d7 100644 --- a/src/voxelalgorithms.h +++ b/src/voxelalgorithms.h @@ -98,6 +98,15 @@ void blit_back_with_light(ServerMap *map, MMVManip *vm, std::map<v3s16, MapBlock*> *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<v3s16, MapBlock*> *modified_blocks); + +/*! * This class iterates trough voxels that intersect with * a line. The collision detection does not see nodeboxes, * every voxel is a cube and is returned. |