From be39f61359ad63f2c6d4aea14c1dfd8357eee03f Mon Sep 17 00:00:00 2001 From: Dániel Juhász Date: Sun, 23 Oct 2016 17:51:13 +0200 Subject: Use node lighting for liquid spreading This commit modifies the liquid transforming procedure to light and unlight nodes instead of whole map blocks. --- src/voxelalgorithms.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/voxelalgorithms.h') 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 > &oldnodes, std::map &modified_blocks); } // namespace voxalgo -- cgit v1.2.3