diff options
author | FaceDeer <derksenmobile@gmail.com> | 2017-04-09 15:31:33 -0600 |
---|---|---|
committer | LNJ <git@lnj.li> | 2017-04-10 13:30:10 +0200 |
commit | 8009743d8d47223292937142e94bc6ba5ecb73fb (patch) | |
tree | 98999ee5ca055a88d0b893dec35c0e83787f8c7a /lua/helpers.lua | |
parent | 69cad92b3e4406b278c17c0c8cd3f705963baa9b (diff) |
Fix "uninitialized global variable" warnings
Diffstat (limited to 'lua/helpers.lua')
-rwxr-xr-x | lua/helpers.lua | 6 |
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")) |