mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-01-26 00:00:22 +01:00
Fix bare pistons pushing objects into walls
This commit is contained in:
parent
fe649e8d68
commit
8e87671c39
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user