Skip to content

Commit f61b1af

Browse files
Hawk777numberZero
authored andcommittedJul 23, 2018
Let things fall behind movestones (#421)
* Let things fall behind movestones
1 parent a234006 commit f61b1af

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed
 

‎mesecons_movestones/init.lua

+9-7
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,16 @@ function mesecon.register_movestone(name, def, is_sticky, is_vertical)
6060
minetest.get_node_timer(frontpos):start(timer_interval)
6161

6262
-- ### Step 3: If sticky, pull stack behind ###
63-
if not is_sticky then
64-
return
65-
end
66-
local backpos = vector.subtract(pos, direction)
67-
success, stack, oldstack = mesecon.mvps_pull_all(backpos, direction, max_pull)
68-
if success then
69-
mesecon.mvps_move_objects(backpos, vector.multiply(direction, -1), oldstack, -1)
63+
if is_sticky then
64+
local backpos = vector.subtract(pos, direction)
65+
success, stack, oldstack = mesecon.mvps_pull_all(backpos, direction, max_pull)
66+
if success then
67+
mesecon.mvps_move_objects(backpos, vector.multiply(direction, -1), oldstack, -1)
68+
end
7069
end
70+
71+
-- ### Step 4: Let things fall ###
72+
minetest.check_for_falling(vector.add(pos, {x=0, y=1, z=0}))
7173
end
7274

7375
def.is_ground_content = false

0 commit comments

Comments
 (0)
Please sign in to comment.