From 584d00a01c4bcd359cc3e585dbcab5cada662348 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Tue, 30 Jan 2018 00:30:02 +0100 Subject: Add minetest.bulk_set_node call + optimize Environment::set_node call (#6958) * Add minetest.bulk_set_node call + experimental mod unittest * Optimize set_node function to prevent triple lookup on contentfeatures Do only one lookup for old, and try to merge old and new lookup if node is same than previous node * Add benchmark function + optimize vector population to have real results --- src/script/lua_api/l_env.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/script/lua_api/l_env.h') diff --git a/src/script/lua_api/l_env.h b/src/script/lua_api/l_env.h index 1314456f8..4a8700f12 100644 --- a/src/script/lua_api/l_env.h +++ b/src/script/lua_api/l_env.h @@ -29,6 +29,10 @@ private: // pos = {x=num, y=num, z=num} static int l_set_node(lua_State *L); + // bulk_set_node([pos1, pos2, ...], node) + // pos = {x=num, y=num, z=num} + static int l_bulk_set_node(lua_State *L); + static int l_add_node(lua_State *L); // remove_node(pos) -- cgit v1.2.3