summaryrefslogtreecommitdiff
path: root/lua/helpers.lua
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-04-09 15:31:33 -0600
committerLNJ <git@lnj.li>2017-04-10 13:30:10 +0200
commit8009743d8d47223292937142e94bc6ba5ecb73fb (patch)
tree98999ee5ca055a88d0b893dec35c0e83787f8c7a /lua/helpers.lua
parent69cad92b3e4406b278c17c0c8cd3f705963baa9b (diff)
Fix "uninitialized global variable" warnings
Diffstat (limited to 'lua/helpers.lua')
-rwxr-xr-xlua/helpers.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/lua/helpers.lua b/lua/helpers.lua
index b94b0a8..51103d9 100755
--- a/lua/helpers.lua
+++ b/lua/helpers.lua
@@ -83,7 +83,7 @@ function drawers.spawn_visuals(pos)
local fdir = vector.new(-bdir.x, 0, -bdir.z)
local pos2 = vector.add(pos, vector.multiply(fdir, 0.438))
- obj = core.add_entity(pos2, "drawers:visual")
+ local obj = core.add_entity(pos2, "drawers:visual")
if bdir.x < 0 then obj:setyaw(0.5 * math.pi) end
if bdir.z < 0 then obj:setyaw(math.pi) end
@@ -103,7 +103,7 @@ function drawers.spawn_visuals(pos)
fdir2 = vector.new(-bdir.x, -0.5, -bdir.z)
end
- objs = {}
+ local objs = {}
drawers.last_visual_id = 1
drawers.last_texture = drawers.get_inv_image(core.get_meta(pos):get_string("name1"))
@@ -149,7 +149,7 @@ function drawers.spawn_visuals(pos)
fdir4 = vector.new(-bdir.x, -0.5, -bdir.z + 0.5)
end
- objs = {}
+ local objs = {}
drawers.last_visual_id = 1
drawers.last_texture = drawers.get_inv_image(core.get_meta(pos):get_string("name1"))