1
0
镜像自地址 https://github.com/minetest-mods/mesecons.git 已同步 2025-09-18 10:20:37 +02:00

Let things fall behind movestones

这个提交包含在:
Christopher Head
2018-07-22 17:42:00 -07:00
父节点 a234006592
当前提交 567322fa81

查看文件

@@ -60,13 +60,17 @@ function mesecon.register_movestone(name, def, is_sticky, is_vertical)
minetest.get_node_timer(frontpos):start(timer_interval)
-- ### Step 3: If sticky, pull stack behind ###
if not is_sticky then
return
if is_sticky then
local backpos = vector.subtract(pos, direction)
success, stack, oldstack = mesecon.mvps_pull_all(backpos, direction, max_pull)
if success then
mesecon.mvps_move_objects(backpos, vector.multiply(direction, -1), oldstack, -1)
end
end
local backpos = vector.subtract(pos, direction)
success, stack, oldstack = mesecon.mvps_pull_all(backpos, direction, max_pull)
if success then
mesecon.mvps_move_objects(backpos, vector.multiply(direction, -1), oldstack, -1)
-- ### Step 4: Let things fall
if not is_vertical then
minetest.check_for_falling(vector.add(pos, {x=0, y=1, z=0}))
end
end