diff options
author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-10-18 18:01:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 18:01:44 -0400 |
commit | b38ffdec279bcded98e34f5116c8d676aa9f73a7 (patch) | |
tree | 31cafdb009b2f81b61a96286a3800a8e408f8f3d /src/script/cpp_api/s_env.cpp | |
parent | 23e9f5db4330a6efee5270160a3959422926ce77 (diff) | |
download | minetest-b38ffdec279bcded98e34f5116c8d676aa9f73a7.tar.xz |
Implement vector and node conversion in Lua (#12609)
Co-authored-by: sfan5 <sfan5@live.de>
Diffstat (limited to 'src/script/cpp_api/s_env.cpp')
-rw-r--r-- | src/script/cpp_api/s_env.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/script/cpp_api/s_env.cpp b/src/script/cpp_api/s_env.cpp index af68f689f..55c0a84f5 100644 --- a/src/script/cpp_api/s_env.cpp +++ b/src/script/cpp_api/s_env.cpp @@ -274,7 +274,6 @@ void ScriptApiEnv::on_liquid_transformed( // Convert the list to a pos array and a node array for lua int index = 1; - const NodeDefManager *ndef = getEnv()->getGameDef()->ndef(); lua_createtable(L, list.size(), 0); lua_createtable(L, list.size(), 0); for(std::pair<v3s16, MapNode> p : list) { @@ -282,7 +281,7 @@ void ScriptApiEnv::on_liquid_transformed( push_v3s16(L, p.first); lua_rawset(L, -4); lua_pushnumber(L, index++); - pushnode(L, p.second, ndef); + pushnode(L, p.second); lua_rawset(L, -3); } |