Fix bare pistons pushing objects into walls

This commit is contained in:
Jude Melton-Houghton 2022-02-28 13:42:34 -05:00
parent fe649e8d68
commit 8e87671c39
1 changed files with 1 additions and 1 deletions

View File

@ -364,7 +364,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack, movefactor)
local min_pos = vector.offset(obj_pos, cbox[1] + 0.01, cbox[2] + 0.01, cbox[3] + 0.01)
local max_pos = vector.offset(obj_pos, cbox[4] - 0.01, cbox[5] - 0.01, cbox[6] - 0.01)
if not area_intersects_nodes(vector.add(min_pos, dir), vector.add(max_pos, dir)) or
area_intersects_nodes(min_pos, max_pos, moved_positions) then
(nodestack[1] ~= nil and area_intersects_nodes(min_pos, max_pos, moved_positions)) then
obj:move_to(vector.add(obj_pos, dir))
end
end