mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +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:
parent
6d1e6f8898
commit
57e5aa6628
8 changed files with 209 additions and 3 deletions
10
src/map.h
10
src/map.h
|
@ -477,6 +477,16 @@ public:
|
|||
u64 getSeed();
|
||||
s16 getWaterLevel();
|
||||
|
||||
/*!
|
||||
* Fixes lighting in one map block.
|
||||
* May modify other blocks as well, as light can spread
|
||||
* out of the specified block.
|
||||
* Returns false if the block is not generated (so nothing
|
||||
* changed), true otherwise.
|
||||
*/
|
||||
bool repairBlockLight(v3s16 blockpos,
|
||||
std::map<v3s16, MapBlock *> *modified_blocks);
|
||||
|
||||
MapSettingsManager settings_mgr;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue