From 076297553bd489156121d6447f09a4a0add6b395 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sun, 3 May 2020 17:34:51 +0100 Subject: [PATCH] //maze3d: fix d-- --- worldeditadditions/maze3d.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/worldeditadditions/maze3d.lua b/worldeditadditions/maze3d.lua index cbfcd63..a326a71 100644 --- a/worldeditadditions/maze3d.lua +++ b/worldeditadditions/maze3d.lua @@ -27,7 +27,7 @@ local function generate_maze3d(seed, width, height, depth, path_length, path_wid if not path_width then path_width = 1 end if not path_depth then path_depth = 1 end - -- print("Generating maze "..width.."x"..height.."x"..depth) + print("Generating maze "..width.."x"..height.."x"..depth.." | path: length "..path_length.." width "..path_width.." depth "..path_depth) math.randomseed(seed) -- seed the random number generator with the system clock local world = {} @@ -93,7 +93,7 @@ local function generate_maze3d(seed, width, height, depth, path_length, path_wid -- world[cz + 2][cy][cx] = " " cz = cz + path_length elseif curdir == "-" then - for iz = cz,cz-path_length do + for iz = cz-path_length,cz do for ix = cx,cx+(path_width-1) do for iy = cy,cy+(path_width-1) do world[iz][iy][ix] = " "