diff options
author | Dániel Juhász <juhdanad@gmail.com> | 2016-10-23 17:51:13 +0200 |
---|---|---|
committer | Ner'zhul <nerzhul@users.noreply.github.com> | 2016-10-27 08:04:42 +0200 |
commit | be39f61359ad63f2c6d4aea14c1dfd8357eee03f (patch) | |
tree | 17209bda6ba8e178b37f55dc479a91d981609cd7 /src/voxelalgorithms.h | |
parent | c071efaa43ad3dcba7d60a7a67e942aae2a7dc83 (diff) | |
download | minetest-be39f61359ad63f2c6d4aea14c1dfd8357eee03f.tar.gz minetest-be39f61359ad63f2c6d4aea14c1dfd8357eee03f.tar.bz2 minetest-be39f61359ad63f2c6d4aea14c1dfd8357eee03f.zip |
Use node lighting for liquid spreading
This commit modifies the liquid transforming procedure to light and
unlight nodes instead of whole map blocks.
Diffstat (limited to 'src/voxelalgorithms.h')
-rw-r--r-- | src/voxelalgorithms.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/voxelalgorithms.h b/src/voxelalgorithms.h index f2b2fde32..3632546dd 100644 --- a/src/voxelalgorithms.h +++ b/src/voxelalgorithms.h @@ -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 |