forked from mtcontrib/homedecor_modpack
fix crash bug in beds mod
This commit is contained in:
parent
fbed3bfab2
commit
9a456f977d
@ -100,12 +100,17 @@ minetest.register_node("beds:bed_bottom", {
|
|||||||
minetest.chat_send_all("You can only sleep at night")
|
minetest.chat_send_all("You can only sleep at night")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
clicker:set_physics_override(0,0,0)
|
local dir = get_dir(pos)
|
||||||
old_yaw = clicker:get_look_yaw()
|
if dir then
|
||||||
guy = clicker
|
clicker:set_physics_override(0,0,0)
|
||||||
clicker:set_look_yaw(get_dir(pos))
|
old_yaw = clicker:get_look_yaw()
|
||||||
minetest.chat_send_all("Good night")
|
guy = clicker
|
||||||
plock(0,2,0.1,clicker, get_dir(pos))
|
clicker:set_look_yaw(dir)
|
||||||
|
minetest.chat_send_all("Good night")
|
||||||
|
plock(0,2,0.1,clicker, dir)
|
||||||
|
else
|
||||||
|
minetest.chat_send_all("The bed is uncomfortable - can't sleep.")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if not clicker:get_player_control().sneak then
|
if not clicker:get_player_control().sneak then
|
||||||
|
Loading…
Reference in New Issue
Block a user