Merge pull request 'Fix a couple issues in mcl_structures' (#2940) from fix_struct_construct_nodes into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/2940
This commit is contained in:
cora 2022-11-15 00:27:35 +00:00
commit 3c287d84d2
2 changed files with 3 additions and 3 deletions

View File

@ -114,7 +114,7 @@ function mcl_structures.construct_nodes(p1,p2,nodes)
end
local function construct_nodes(pos,def,pr)
return mcl_structures.construct_nodes(vector.offset(pos,-def.sidelen/2,0,-def.sidelen/2),vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2))
return mcl_structures.construct_nodes(vector.offset(pos,-def.sidelen/2,0,-def.sidelen/2),vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2),def.construct_nodes)
end

View File

@ -107,8 +107,8 @@ mcl_structures.register_structure("end_spike",{
place_func = function(pos,def,pr)
local d = pr:next(6,12)
local h = d * pr:next(4,6)
local p1 = vector.add(pos,-d/2,0,-d/2)
local p2 = vector.add(pos,d/2,h+d,d/2)
local p1 = vector.offset(pos, -d / 2, 0, -d / 2)
local p2 = vector.offset(pos, d / 2, h + d, d / 2)
minetest.emerge_area(p1, p2, function(blockpos, action, calls_remaining, param)
if calls_remaining ~= 0 then return end
local s = make_endspike(pos,d,h)