1
0
mirror of https://github.com/HybridDog/vector_extras.git synced 2025-07-17 23:40:23 +02:00

6 Commits

2 changed files with 3 additions and 11 deletions

View File

@ -334,16 +334,7 @@ function funcs.straightdelay(s, v, a)
return (math.sqrt(v*v+2*a*s)-v)/a
end
-- override vector.zero
-- builtin used not to have the vector.zero function. to keep compatibility,
-- vector.zero has to be a 0-vector and vector.zero() has to return a 0-vector
-- => we make a callable 0-vector table
if not vector.zero then
vector.zero = {x = 0, y = 0, z = 0}
else
local old_zero = vector.zero
vector.zero = setmetatable({x = 0, y = 0, z = 0}, {__call = old_zero})
end
vector.zero = vector.new()
function funcs.sun_dir(time)
if not time then
@ -1038,3 +1029,5 @@ for name,func in pairs(funcs) do
vector[name] = func
end
end
minetest.log("action", "[vector_extras] loaded.")

View File

@ -1 +0,0 @@
name = vector_extras