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:
HybridDog 2016-05-27 17:20:57 +02:00
parent 83ff39b66a
commit 86d267e8f1

View File

@ -746,6 +746,10 @@ function funcs.get_max_coords(pos)
return "x", "y", "z"
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")