From: RealBadAngel Date: Fri, 14 Dec 2012 23:52:09 +0000 (+0100) Subject: bugfix X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=7e7ec9713ab4d63ecccda7e51eb2e77709f16b5a;p=zefram%2Fminetest%2Ftechnic.git bugfix --- 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