Skip to content

Commit 3322ef9

Browse files
committedJan 4, 2018
Fix negative height pyramids (fixes #152)
1 parent b259906 commit 3322ef9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed
 

Diff for: ‎worldedit/primitives.lua

+4-3
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,13 @@ function worldedit.pyramid(pos, axis, height, node_name, hollow)
208208
local other1, other2 = worldedit.get_axis_others(axis)
209209

210210
-- Set up voxel manipulator
211-
local manip, area = mh.init_axis_radius(pos, axis,
212-
height >= 0 and height or -height)
211+
-- FIXME: passing negative <radius> causes mis-sorted pos to be passed
212+
-- into mh.init() which is technically not allowed but works
213+
local manip, area = mh.init_axis_radius(pos, axis, height)
213214
local data = mh.get_empty_data(area)
214215

215216
-- Handle inverted pyramids
216-
local start_axis, end_axis, step
217+
local step
217218
if height > 0 then
218219
height = height - 1
219220
step = 1

0 commit comments

Comments
 (0)
Please sign in to comment.