diff options
Diffstat (limited to 'src/map.cpp')
-rw-r--r-- | src/map.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map.cpp b/src/map.cpp index 7a58c90c7..1c1cd7c28 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -1766,7 +1766,11 @@ void Map::transformLiquids(std::map<v3s16, MapBlock*> & modified_blocks) content_t new_node_content; s8 new_node_level = -1; s8 max_node_level = -1; - u8 range = rangelim(nodemgr->get(liquid_kind).liquid_range, 0, LIQUID_LEVEL_MAX+1); + + u8 range = nodemgr->get(liquid_kind).liquid_range; + if (range > LIQUID_LEVEL_MAX+1) + range = LIQUID_LEVEL_MAX+1; + if ((num_sources >= 2 && nodemgr->get(liquid_kind).liquid_renewable) || liquid_type == LIQUID_SOURCE) { // liquid_kind will be set to either the flowing alternative of the node (if it's a liquid) // or the flowing alternative of the first of the surrounding sources (if it's air), so |