Skip to content

Commit

Permalink
Fix bare pistons pushing objects into walls
Browse files Browse the repository at this point in the history
  • Loading branch information
TurkeyMcMac committed Feb 28, 2022
1 parent 206ae90 commit d8ee8f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesecons_mvps/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,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
Expand Down

0 comments on commit d8ee8f8

Please sign in to comment.