From 7e7ec9713ab4d63ecccda7e51eb2e77709f16b5a Mon Sep 17 00:00:00 2001 From: RealBadAngel Date: Sat, 15 Dec 2012 00:52:09 +0100 Subject: [PATCH] bugfix --- technic/technic/flashlight.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/technic/technic/flashlight.lua b/technic/technic/flashlight.lua index 460cc21..e773cfc 100644 --- a/technic/technic/flashlight.lua +++ b/technic/technic/flashlight.lua @@ -60,6 +60,7 @@ end) minetest.register_globalstep(function(dtime) for i,player_name in ipairs(players) do local player = minetest.env:get_player_by_name(player_name) + if player then flashlight_weared=check_for_flashlight(player) local pos = player:getpos() local rounded_pos = {x=round(pos.x),y=round(pos.y)+1,z=round(pos.z)} @@ -111,6 +112,7 @@ minetest.register_globalstep(function(dtime) end end + end end) minetest.register_node("technic:light", { @@ -164,4 +166,4 @@ local hotbar=inv:get_list("main") end end return false -end \ No newline at end of file +end -- 2.30.2