mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Use node lighting for liquid spreading
This commit modifies the liquid transforming procedure to light and unlight nodes instead of whole map blocks.
This commit is contained in:
parent
c071efaa43
commit
be39f61359
3 changed files with 145 additions and 122 deletions
|
@ -58,18 +58,19 @@ SunlightPropagateResult propagateSunlight(VoxelManipulator &v, VoxelArea a,
|
|||
/*!
|
||||
* Updates the lighting on the map.
|
||||
* The result will be correct only if
|
||||
* no nodes were changed except the given one.
|
||||
* no nodes were changed except the given ones.
|
||||
* Before calling this procedure make sure that all new nodes on
|
||||
* the map have zero light level!
|
||||
*
|
||||
* \param p position of the changed node
|
||||
* \param oldnode this node was overwritten on the map
|
||||
* \param oldnodes contains the MapNodes that were replaced by the new
|
||||
* MapNodes and their positions
|
||||
* \param modified_blocks output, contains all map blocks that
|
||||
* the function modified
|
||||
*/
|
||||
void update_lighting_node(
|
||||
void update_lighting_nodes(
|
||||
Map *map,
|
||||
INodeDefManager *ndef,
|
||||
v3s16 p,
|
||||
MapNode oldnode,
|
||||
std::vector<std::pair<v3s16, MapNode> > &oldnodes,
|
||||
std::map<v3s16, MapBlock*> &modified_blocks);
|
||||
|
||||
} // namespace voxalgo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue