From 0cc8962258a522ce787fb5b2df0c16e3e412d82e Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Wed, 20 Feb 2019 18:17:44 +0100 Subject: [PATCH] Fix stuck player if server shuts down during sleep --- mods/ITEMS/mcl_beds/functions.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index 6b35000b..27faef23 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -318,8 +318,11 @@ end -- Callbacks minetest.register_on_joinplayer(function(player) if player:get_attribute("mcl_beds:sleeping") == "true" then + -- Make player awake on joining server player:set_attribute("mcl_beds:sleeping", "false") end + playerphysics.remove_physics_factor(player, "speed", "mcl_beds:sleeping") + playerphysics.remove_physics_factor(player, "jump", "mcl_beds:sleeping") end) minetest.register_on_leaveplayer(function(player)