summaryrefslogtreecommitdiff
path: root/src/mapnode.cpp
diff options
context:
space:
mode:
authorVitaliy <numzer0@yandex.ru>2020-05-21 00:52:10 +0300
committerGitHub <noreply@github.com>2020-05-20 22:52:10 +0100
commit82e41378937378667cdbdda3ea9e8c1acb5822ea (patch)
tree07a5e04b6979b42e763640b8dccec6e7c8855854 /src/mapnode.cpp
parent42fcfb75e85523a2fa5d99a453c2fabc2c04c0f6 (diff)
downloadminetest-82e41378937378667cdbdda3ea9e8c1acb5822ea.tar.gz
minetest-82e41378937378667cdbdda3ea9e8c1acb5822ea.tar.bz2
minetest-82e41378937378667cdbdda3ea9e8c1acb5822ea.zip
Cache liquid alternative IDs (#8053)
Diffstat (limited to 'src/mapnode.cpp')
-rw-r--r--src/mapnode.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mapnode.cpp b/src/mapnode.cpp
index 24d62b504..dcf1f6d6e 100644
--- a/src/mapnode.cpp
+++ b/src/mapnode.cpp
@@ -622,10 +622,10 @@ s8 MapNode::setLevel(const NodeDefManager *nodemgr, s16 level)
}
if (level >= LIQUID_LEVEL_SOURCE) {
rest = level - LIQUID_LEVEL_SOURCE;
- setContent(nodemgr->getId(f.liquid_alternative_source));
+ setContent(f.liquid_alternative_source_id);
setParam2(0);
} else {
- setContent(nodemgr->getId(f.liquid_alternative_flowing));
+ setContent(f.liquid_alternative_flowing_id);
setParam2((level & LIQUID_LEVEL_MASK) | (getParam2() & ~LIQUID_LEVEL_MASK));
}
} else if (f.param_type_2 == CPT2_LEVELED) {