1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

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.
This commit is contained in:
Dániel Juhász 2017-03-11 17:07:04 +01:00 committed by Ekdohibs
parent 6d1e6f8898
commit 57e5aa6628
8 changed files with 209 additions and 3 deletions

View file

@ -97,6 +97,15 @@ void update_block_border_lighting(Map *map, MapBlock *block,
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,