Prevent player from walking while sleeping
This commit is contained in:
parent
3121ab7c2d
commit
fd73c81d23
4 changed files with 10 additions and 6 deletions
|
@ -139,9 +139,10 @@ minetest.register_globalstep(function(dtime)
|
|||
end
|
||||
end
|
||||
|
||||
-- set player physics
|
||||
-- TODO: Resolve conflict
|
||||
player:set_physics_override(def.speed, def.jump, def.gravity)
|
||||
-- Set player physics if there's no conflict
|
||||
if player:get_attribute("mcl_beds:sleeping") ~= "true" then
|
||||
player:set_physics_override(def.speed, def.jump, def.gravity)
|
||||
end
|
||||
|
||||
-- Is player suffocating inside node? (Only for solid full opaque cube type nodes
|
||||
-- without group disable_suffocation=1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue