//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
No known key found for this signature in database
GPG Key ID: 1BE5172E637709C2
2 changed files with 2 additions and 4 deletions

@ -140,5 +140,5 @@ function worldeditadditions.erode.snowballs(heightmap_initial, heightmap, height
)
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

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