summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2012-12-15 00:52:09 +0100
committerRealBadAngel <mk@realbadangel.pl>2012-12-15 00:52:09 +0100
commit7e7ec9713ab4d63ecccda7e51eb2e77709f16b5a (patch)
tree26c186b9671ac51b2cd166f275b4a0de51c07431
parente7d3d78ed2817aaa404eedd5b8c3c16396251d35 (diff)
bugfix
-rw-r--r--technic/technic/flashlight.lua4
1 files changed, 3 insertions, 1 deletions
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