New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tall schematic decorations unnecessarily failing near chunk top #4401

Closed
paramat opened this Issue Aug 3, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@paramat
Member

paramat commented Aug 3, 2016

screenshot_20160802_014105

^ Jungletrees missing at y = 126 and y = 127

Decoration placement is coded to fail if decoration height exceeds 16 nodes above the mapchunk top (exceeds the volume of the mapgen voxelmanip). placeDeco() looks up the height of simple decorations https://github.com/minetest/minetest/blob/master/src/mg_decoration.cpp#L148 but when it looks up the height of a schematic decoration https://github.com/minetest/minetest/blob/master/src/mg_decoration.cpp#L371 the height of the decoration is returned, but this doesn't take into account how schematics are placed sunk 1 node into the ground, or how 'place centre y' can place the schematic centre at ground level.

For jungletrees i was careful to keep their height within 16 nodes above mapchunk top, but they are sunk 1 node into the ground meaning their total height is 17 nodes

            if (y + getHeight() >= mg->vm->m_area.MaxEdge.Y) {
continue;

does not allow placement in this case. There is also an error, the comparison should be '>'.

Assigning myself.

@paramat

This comment has been minimized.

Show comment
Hide comment
@paramat

paramat Aug 5, 2016

Member

#4402 merged.

Member

paramat commented Aug 5, 2016

#4402 merged.

@paramat paramat closed this Aug 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment