aboutsummaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-16 08:31:33 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2011-08-16 16:50:38 +0200
commit5fce673a569747960dbe5befec8e2c42b87ce7f6 (patch)
treed331acca84447acb2482c3c8f7af499f0b9c03e6 /src/map.cpp
parent708f1c336ef8214e380791b69213a3e3ddd873e2 (diff)
downloadminetest-5fce673a569747960dbe5befec8e2c42b87ce7f6.tar.gz
minetest-5fce673a569747960dbe5befec8e2c42b87ce7f6.tar.bz2
minetest-5fce673a569747960dbe5befec8e2c42b87ce7f6.zip
Use defines for liquid levels
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map.cpp b/src/map.cpp
index a540860bc..94cf2e864 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1584,7 +1584,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
LiquidType liquid_type = content_features(n0.getContent()).liquid_type;
switch (liquid_type) {
case LIQUID_SOURCE:
- liquid_level = 8;
+ liquid_level = LIQUID_LEVEL_SOURCE;
liquid_kind = content_features(n0.getContent()).liquid_alternative_flowing;
break;
case LIQUID_FLOWING:
@@ -1674,7 +1674,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
} else if (num_sources == 1 && sources[0].t != NEIGHBOR_LOWER) {
// liquid_kind is set properly, see above
new_node_content = liquid_kind;
- new_node_level = 7;
+ new_node_level = LIQUID_LEVEL_MAX;
} else {
// no surrounding sources, so get the maximum level that can flow into this node
for (u16 i = 0; i < num_flows; i++) {
@@ -1682,8 +1682,8 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
switch (flows[i].t) {
case NEIGHBOR_UPPER:
if (nb_liquid_level + WATER_DROP_BOOST > new_node_level) {
- new_node_level = 7;
- if (nb_liquid_level + WATER_DROP_BOOST < 7)
+ new_node_level = LIQUID_LEVEL_MAX;
+ if (nb_liquid_level + WATER_DROP_BOOST < LIQUID_LEVEL_MAX)
new_node_level = nb_liquid_level + WATER_DROP_BOOST;
}
break;