From 9337cc0b563305d359bca7761d20d90e505c34c7 Mon Sep 17 00:00:00 2001 From: HybridDog Date: Sun, 3 May 2015 11:30:40 +0200 Subject: [PATCH] =?UTF-8?q?sqrt(scalar(dir))=3D1=20=E2=86=92=20scalar(dir)?= =?UTF-8?q?=3D1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 603223f..287dd92 100644 --- a/init.lua +++ b/init.lua @@ -243,7 +243,7 @@ function nuke.explode_inv(pos, tab, range, dir) for _,npos in pairs(tab) do local f = npos[1] local x,y,z = f.x,f.y,f.z - local dif = (dx*x+dy*y+dz*z)/(dx*dx+dy*dy+dz*dz) + local dif = dx*x+dy*y+dz*z if dif < 0 and dif ~= math.huge then dif = -dif*2