aboutsummaryrefslogtreecommitdiff
path: root/src/script/lua_api/l_env.cpp
diff options
context:
space:
mode:
authorJude Melton-Houghton <jwmhjwmh@gmail.com>2022-10-09 10:50:26 -0400
committerGitHub <noreply@github.com>2022-10-09 10:50:26 -0400
commit9676364c1fe5fe5eae69c55e7d7a45392decfb2d (patch)
treeb21c99ce54820b24bfef9028c39b01f28ed3c1ca /src/script/lua_api/l_env.cpp
parent440d966b939059dfa51604eb68d61eecb12baeb4 (diff)
downloadminetest-9676364c1fe5fe5eae69c55e7d7a45392decfb2d.tar.xz
Optimize lighting calculation (#12797)
Diffstat (limited to 'src/script/lua_api/l_env.cpp')
-rw-r--r--src/script/lua_api/l_env.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/lua_api/l_env.cpp b/src/script/lua_api/l_env.cpp
index 8f2dc0cb4..1956fb948 100644
--- a/src/script/lua_api/l_env.cpp
+++ b/src/script/lua_api/l_env.cpp
@@ -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);
}