mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Light calculation: New bulk node lighting code
This commit introduces a new bulk node lighting algorithm to minimize lighting bugs during l-system tree generation, schematic placement and non-mapgen-object lua voxelmanip light calculation. If the block above the changed area is not loaded, it gets loaded to avoid lighting bugs. Light is updated as soon as write_to_map is called on a voxel manipulator, therefore update_map does nothing.
This commit is contained in:
parent
d785456b3f
commit
ab371cc934
10 changed files with 408 additions and 636 deletions
16
src/map.h
16
src/map.h
|
@ -208,22 +208,6 @@ public:
|
|||
// position is valid, otherwise false
|
||||
MapNode getNodeNoEx(v3s16 p, bool *is_valid_position = NULL);
|
||||
|
||||
void unspreadLight(enum LightBank bank,
|
||||
std::map<v3s16, u8> & from_nodes,
|
||||
std::set<v3s16> & light_sources,
|
||||
std::map<v3s16, MapBlock*> & modified_blocks);
|
||||
|
||||
void spreadLight(enum LightBank bank,
|
||||
std::set<v3s16> & from_nodes,
|
||||
std::map<v3s16, MapBlock*> & modified_blocks);
|
||||
|
||||
void updateLighting(enum LightBank bank,
|
||||
std::map<v3s16, MapBlock*> & a_blocks,
|
||||
std::map<v3s16, MapBlock*> & modified_blocks);
|
||||
|
||||
void updateLighting(std::map<v3s16, MapBlock*> & a_blocks,
|
||||
std::map<v3s16, MapBlock*> & modified_blocks);
|
||||
|
||||
/*
|
||||
These handle lighting but not faces.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue