diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-10-09 10:50:26 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-09 10:50:26 -0400 |
commit | 9676364c1fe5fe5eae69c55e7d7a45392decfb2d (patch) | |
tree | b21c99ce54820b24bfef9028c39b01f28ed3c1ca /src/unittest/test_mapnode.cpp | |
parent | 440d966b939059dfa51604eb68d61eecb12baeb4 (diff) | |
download | minetest-9676364c1fe5fe5eae69c55e7d7a45392decfb2d.tar.xz |
Optimize lighting calculation (#12797)
Diffstat (limited to 'src/unittest/test_mapnode.cpp')
-rw-r--r-- | src/unittest/test_mapnode.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/unittest/test_mapnode.cpp b/src/unittest/test_mapnode.cpp index 365ee0c86..9a5c69bed 100644 --- a/src/unittest/test_mapnode.cpp +++ b/src/unittest/test_mapnode.cpp @@ -47,9 +47,10 @@ void TestMapNode::testNodeProperties(const NodeDefManager *nodedef) { MapNode n(CONTENT_AIR); + ContentLightingFlags f = nodedef->getLightingFlags(n); UASSERT(n.getContent() == CONTENT_AIR); - UASSERT(n.getLight(LIGHTBANK_DAY, nodedef) == 0); - UASSERT(n.getLight(LIGHTBANK_NIGHT, nodedef) == 0); + UASSERT(n.getLight(LIGHTBANK_DAY, f) == 0); + UASSERT(n.getLight(LIGHTBANK_NIGHT, f) == 0); // Transparency n.setContent(CONTENT_AIR); |