diff options
author | sfan5 <sfan5@live.de> | 2018-01-04 01:03:51 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2018-01-04 01:03:51 +0100 |
commit | 3322ef90c4f868731119f399314aab73f029c389 (patch) | |
tree | e7eb99813259fe766cbb8c7e21ef4f0b4d496313 | |
parent | b259906fd0241a1b2c7fafd199c87a895aa051dc (diff) |
Fix negative height pyramids (fixes #152)
-rw-r--r-- | worldedit/primitives.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/worldedit/primitives.lua b/worldedit/primitives.lua index 1bebfde..0a7d175 100644 --- a/worldedit/primitives.lua +++ b/worldedit/primitives.lua @@ -208,12 +208,13 @@ function worldedit.pyramid(pos, axis, height, node_name, hollow) local other1, other2 = worldedit.get_axis_others(axis)
-- Set up voxel manipulator
- local manip, area = mh.init_axis_radius(pos, axis,
- height >= 0 and height or -height)
+ -- FIXME: passing negative <radius> causes mis-sorted pos to be passed
+ -- into mh.init() which is technically not allowed but works
+ local manip, area = mh.init_axis_radius(pos, axis, height)
local data = mh.get_empty_data(area)
-- Handle inverted pyramids
- local start_axis, end_axis, step
+ local step
if height > 0 then
height = height - 1
step = 1
|