mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Optimize lighting calculation (#12797)
This commit is contained in:
parent
440d966b93
commit
9676364c1f
18 changed files with 188 additions and 220 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue