forked from mtcontrib/vector_extras
add vector.serialize
it works ~4.5 times as fast as dump dump works ~1.3 times as fast as minetest.serialize if a vector is passed
This commit is contained in:
parent
83ff39b66a
commit
86d267e8f1
4
init.lua
4
init.lua
|
@ -746,6 +746,10 @@ function funcs.get_max_coords(pos)
|
||||||
return "x", "y", "z"
|
return "x", "y", "z"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function funcs.serialize(vec)
|
||||||
|
return "{x=" .. vec.x .. ",y=" .. vec.y .. ",z=" .. vec.z .. "}"
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--dofile(minetest.get_modpath("vector_extras").."/vector_meta.lua")
|
--dofile(minetest.get_modpath("vector_extras").."/vector_meta.lua")
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user