From 95a528221c7990ba083c96d2cc9f029962b616c8 Mon Sep 17 00:00:00 2001 From: HybridDog Date: Fri, 29 May 2015 12:09:25 +0200 Subject: [PATCH] :cat2: --- init.lua | 2 +- vector_meta.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 1dfd317..2c9516d 100644 --- a/init.lua +++ b/init.lua @@ -381,7 +381,7 @@ function funcs.explosion_table(r) for x=-r,r do for y=-r,r do for z=-r,r do - local rc = x*x+y*y+z*z + local rc = x*x+y*y+z*z if rc <= tmp then local np={x=x, y=y, z=z} if math.floor(math.sqrt(rc) +0.5) > r-1 then diff --git a/vector_meta.lua b/vector_meta.lua index d9606cd..b4ed291 100644 --- a/vector_meta.lua +++ b/vector_meta.lua @@ -3,12 +3,12 @@ vector.meta.nodes = {} vector.meta.nodes_file = { load = function() - local nodesfile = io.open(minetest.get_worldpath()..'/vector_nodes.txt', "r") + local nodesfile = io.open(minetest.get_worldpath()..'/vector_nodes.txt', "r") if nodesfile then local contents = nodesfile:read('*all') io.close(nodesfile) - if contents ~= nil then - local lines = string.split(contents, "\n") + if contents ~= nil then + local lines = string.split(contents, "\n") for _,entry in ipairs(lines) do local name, px, py, pz, meta = unpack(string.split(entry, "°")) vector.meta.set_node({x=px, y=py, z=pz}, name, meta)