Let things fall behind movestones

This commit is contained in:
Christopher Head
2018-07-22 17:42:00 -07:00
parent a234006592
commit 567322fa81

View File

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