mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Optimize lighting calculation (#12797)
This commit is contained in:
committed by
GitHub
parent
440d966b93
commit
9676364c1f
@@ -379,7 +379,7 @@ int ModApiEnvMod::l_get_node_light(lua_State *L)
|
||||
MapNode n = env->getMap().getNode(pos, &is_position_ok);
|
||||
if (is_position_ok) {
|
||||
const NodeDefManager *ndef = env->getGameDef()->ndef();
|
||||
lua_pushinteger(L, n.getLightBlend(dnr, ndef));
|
||||
lua_pushinteger(L, n.getLightBlend(dnr, ndef->getLightingFlags(n)));
|
||||
} else {
|
||||
lua_pushnil(L);
|
||||
}
|
||||
|
Reference in New Issue
Block a user