//maze: fix some areas of generated mazes not being explored

This commit is contained in:
Starbeamrainbowlabs 2020-09-28 01:30:15 +01:00
parent cf2d3f408c
commit 39103a046f
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 2 additions and 4 deletions

View file

@ -140,5 +140,5 @@ function worldeditadditions.erode.snowballs(heightmap_initial, heightmap, height
) )
end end
return true, ""..#stats_steps.." snowballs simulated, max "..params.max_steps.." steps (average ~"..worldeditadditions.average(stats_steps)..")" return true, ""..#stats_steps.." snowballs simulated, max "..params.max_steps.." steps (averaged ~"..worldeditadditions.average(stats_steps).." steps)"
end end

View file

@ -95,9 +95,7 @@ local function generate_maze(seed, width, height, path_length, path_width)
cx = cx + path_length cx = cx + path_length
end end
if #directions > 1 then table.insert(nodes, { x = cx, y = cy })
table.insert(nodes, { x = cx, y = cy })
end
else else
table.remove(nodes, curnode) table.remove(nodes, curnode)
end end