1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

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
This commit is contained in:
Loïc Blot 2018-01-30 00:30:02 +01:00 committed by GitHub
parent 3b4df956b1
commit 584d00a01c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 124 additions and 3 deletions

View file

@ -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)