mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-08-20 13:34:05 +02:00
maze bugfix: correct stalling when 0 is picked (Lua starts things at 1 - ewwwww......)
This commit is contained in:
parent
b235562ab5
commit
c83cc9bf39
@ -58,7 +58,7 @@ function generate_maze(seed, width, height)
|
|||||||
if #directions > 0 then
|
if #directions > 0 then
|
||||||
-- we still have somewhere that we can go
|
-- we still have somewhere that we can go
|
||||||
--print("This node is not a dead end yet.")
|
--print("This node is not a dead end yet.")
|
||||||
local curdirnum = math.random(0, #directions)
|
local curdirnum = math.random(1, #directions)
|
||||||
local curdir = string.sub(directions, curdirnum, curdirnum)
|
local curdir = string.sub(directions, curdirnum, curdirnum)
|
||||||
if curdir == "u" then
|
if curdir == "u" then
|
||||||
world[cy - 1][cx] = " "
|
world[cy - 1][cx] = " "
|
||||||
|
Loading…
Reference in New Issue
Block a user