1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 01:25:20 +02:00

Optimize lighting calculation (#12797)

This commit is contained in:
Jude Melton-Houghton
2022-10-09 10:50:26 -04:00
committed by GitHub
parent 440d966b93
commit 9676364c1f
18 changed files with 188 additions and 220 deletions

View File

@@ -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);