Skip to content

Commit d8ee8f8

Browse files
committed
Fix bare pistons pushing objects into walls
1 parent 206ae90 commit d8ee8f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mesecons_mvps/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack, movefactor)
381381
local min_pos = vector.offset(obj_pos, cbox[1] + 0.01, cbox[2] + 0.01, cbox[3] + 0.01)
382382
local max_pos = vector.offset(obj_pos, cbox[4] - 0.01, cbox[5] - 0.01, cbox[6] - 0.01)
383383
if not area_intersects_nodes(vector.add(min_pos, dir), vector.add(max_pos, dir)) or
384-
area_intersects_nodes(min_pos, max_pos, moved_positions) then
384+
(nodestack[1] ~= nil and area_intersects_nodes(min_pos, max_pos, moved_positions)) then
385385
obj:move_to(vector.add(obj_pos, dir))
386386
end
387387
end

0 commit comments

Comments
 (0)