mirror of
https://github.com/sbrl/Minetest-WorldEditAdditions.git
synced 2024-11-22 07:23:00 +00:00
maze bugfix: correct stalling when 0 is picked (Lua starts things at 1 - ewwwww......)
This commit is contained in:
parent
b235562ab5
commit
c83cc9bf39
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ function generate_maze(seed, width, height)
|
|||
if #directions > 0 then
|
||||
-- we still have somewhere that we can go
|
||||
--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)
|
||||
if curdir == "u" then
|
||||
world[cy - 1][cx] = " "
|
||||
|
|
Loading…
Reference in a new issue