I've always had the math all wrong here.
Our spawn pos is already .5 above the ground. We want only to correct players that fall through the floow. At -0.95 they can still walk normal, but instead we correct them at -0.45 which almost always hits them.
This commit is contained in:
parent
f547987974
commit
80738b06b7
@ -373,7 +373,7 @@ function boxes.open_box(player, box_id_list)
|
||||
end
|
||||
|
||||
local p = player:get_pos()
|
||||
if p and p.y < spawn_pos.y - 0.45 and boxes.players_in_boxes[name] then
|
||||
if p and p.y < spawn_pos.y - 0.95 and boxes.players_in_boxes[name] then
|
||||
minetest.log("error", name .. " fell from an entrance lobby")
|
||||
player:set_pos({x = p.x, y = spawn_pos.y + 0.5, z = p.z})
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user