Check the node below on globalstep, and if it's air just unmount (fixes #1)

cora, thanks again ^^
This commit is contained in:
Mikita Wiśniewski 2022-05-16 21:22:48 +07:00
parent 78ad6f1e6c
commit 90303158ad
1 changed files with 14 additions and 8 deletions

View File

@ -45,6 +45,12 @@ minetest.register_globalstep(function(dtime)
mcl_player.player_attached[name] = false mcl_player.player_attached[name] = false
mcl_player.player_set_animation(players[i], "stand", 30) mcl_player.player_set_animation(players[i], "stand", 30)
end end
-- check the node below player (and if it's air, just unmount)
if minetest.get_node(vector.offset(players[i]:get_pos(),0,-1,0)).name == "air" then
players[i]:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
players[i]:set_physics_override(1, 1, 1)
mcl_player.player_attached[name] = false
end
end end
end) end)