aboutsummaryrefslogtreecommitdiff
path: root/src/map.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-25 17:00:50 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:51 +0200
commite5650bb54917ead2dccac9b46dfa1a00cd737694 (patch)
treec1cfda62fa6df17069f368f3b07fad11eb3d3a04 /src/map.cpp
parent18bb0ea1ead82406bcfb89ea14908a4d0063209e (diff)
downloadhax-minetest-server-e5650bb54917ead2dccac9b46dfa1a00cd737694.tar.gz
hax-minetest-server-e5650bb54917ead2dccac9b46dfa1a00cd737694.zip
Make liquid_alternative_* to be strings
Diffstat (limited to 'src/map.cpp')
-rw-r--r--src/map.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/map.cpp b/src/map.cpp
index d27c6da12..822b3f659 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -1602,7 +1602,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
switch (liquid_type) {
case LIQUID_SOURCE:
liquid_level = LIQUID_LEVEL_SOURCE;
- liquid_kind = nodemgr->get(n0).liquid_alternative_flowing;
+ liquid_kind = nodemgr->getId(nodemgr->get(n0).liquid_alternative_flowing);
break;
case LIQUID_FLOWING:
liquid_level = (n0.param2 & LIQUID_LEVEL_MASK);
@@ -1662,8 +1662,8 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
case LIQUID_SOURCE:
// if this node is not (yet) of a liquid type, choose the first liquid type we encounter
if (liquid_kind == CONTENT_AIR)
- liquid_kind = nodemgr->get(nb.n.getContent()).liquid_alternative_flowing;
- if (nodemgr->get(nb.n.getContent()).liquid_alternative_flowing !=liquid_kind) {
+ liquid_kind = nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing);
+ if (nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing) != liquid_kind) {
neutrals[num_neutrals++] = nb;
} else {
sources[num_sources++] = nb;
@@ -1672,8 +1672,8 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
case LIQUID_FLOWING:
// if this node is not (yet) of a liquid type, choose the first liquid type we encounter
if (liquid_kind == CONTENT_AIR)
- liquid_kind = nodemgr->get(nb.n.getContent()).liquid_alternative_flowing;
- if (nodemgr->get(nb.n.getContent()).liquid_alternative_flowing != liquid_kind) {
+ liquid_kind = nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing);
+ if (nodemgr->getId(nodemgr->get(nb.n).liquid_alternative_flowing) != liquid_kind) {
neutrals[num_neutrals++] = nb;
} else {
flows[num_flows++] = nb;
@@ -1694,7 +1694,7 @@ void Map::transformLiquids(core::map<v3s16, MapBlock*> & modified_blocks)
// 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->get(liquid_kind).liquid_alternative_source;
+ new_node_content = nodemgr->getId(nodemgr->get(liquid_kind).liquid_alternative_source);
} else if (num_sources == 1 && sources[0].t != NEIGHBOR_LOWER) {
// liquid_kind is set properly, see above
new_node_content = liquid_kind;