From d81fe9a72861c39b524dd0675d68e2c51a816375 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Fri, 13 Dec 2013 18:29:48 +0000 Subject: [PATCH] Improve mid-range accuracy --- shooter.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shooter.lua b/shooter.lua index 627ca8d..1ab4d24 100644 --- a/shooter.lua +++ b/shooter.lua @@ -127,10 +127,10 @@ function shooter:fire_weapon(user, pointed_thing, def) p2.y = p2.y - 0.75 if x > 0 and x < target.distance and x < def.range then local yx = 0 - if x > 50 then + if x > 30 then yx = 0.001 * (10 - x * 0.1) else - yx = 0.000015 * (x * x) - 0.0015 * x + 0.042 + yx = 0.00002 * (x * x) - 0.002 * x + 0.05 end local yy = yx * 3 local v2 = vector.normalize(vector.direction(p1, p2))