summaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorIlya Zhuravlev <zhuravlevilya@ya.ru>2012-09-07 20:48:12 +0400
committerIlya Zhuravlev <zhuravlevilya@ya.ru>2012-09-07 20:48:12 +0400
commit926830e0df7b95d4e53c917db07236ef3e19e991 (patch)
tree8c99c4fa73b837b80e57f9246ff0c82632507953 /src/map.cpp
parent9696ed31a41b5e3ca85bad4a29c190a0d25c7752 (diff)
downloadminetest-926830e0df7b95d4e53c917db07236ef3e19e991.tar.gz
minetest-926830e0df7b95d4e53c917db07236ef3e19e991.tar.bz2
minetest-926830e0df7b95d4e53c917db07236ef3e19e991.zip
Add liquid_renewable property.
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map.cpp b/src/map.cpp
index 39c6d292b..2845f3a67 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1746,12 +1746,12 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
content_t new_node_content;
s8 new_node_level = -1;
s8 max_node_level = -1;
- if (num_sources >= 2 || liquid_type == LIQUID_SOURCE) {
+ 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
// it's perfectly safe to use liquid_kind here to determine the new node content.
new_node_content = nodemgr->getId(nodemgr->get(liquid_kind).liquid_alternative_source);
- } else if (num_sources == 1 && sources[0].t != NEIGHBOR_LOWER) {
+ } else if (num_sources >= 1 && sources[0].t != NEIGHBOR_LOWER) {
// liquid_kind is set properly, see above
new_node_content = liquid_kind;
max_node_level = new_node_level = LIQUID_LEVEL_MAX;