sometimes pos is nil when exiting bed?

master
rnd 2015-03-14 08:11:48 +01:00
parent f009269949
commit 563cd26407
1 changed files with 1 additions and 0 deletions

View File

@ -28,6 +28,7 @@ function plock(start, max, tick, player, yaw)
end
function exit(pos)
if pos==nil then return end -- error occured
if minetest.env:get_node({x=pos.x+1,y=pos.y,z=pos.z}).name == "air" then
return {x=pos.x+1,y=pos.y,z=pos.z}
elseif minetest.env:get_node({x=pos.x-1,y=pos.y,z=pos.z}).name == "air" then