sbrl / Minetest-WorldEditAdditions

Extra tools and commands to extend WorldEdit for Minetest
https://worldeditadditions.mooncarrot.space/
Mozilla Public License 2.0
16 stars 3 forks source link

//maze outer wall glitch #60

Closed VorTechnix closed 2 years ago

VorTechnix commented 3 years ago

For the command //maze sand 2 1: In a selection with even lengths on x and z there are 2 extra layers radiating from pos2:

image

In a selection with odd lengths on x and z there is 1 extra layer radiating from pos2:

image

sbrl commented 3 years ago

Haha thanks! Yeah, that's a bug I thought I'd squashed.

sbrl commented 2 years ago

Fixed it! It was a bug in the core maze generation algorithm. It generated mazes like this:

#####################################
# #   #   #     #     #       #   ###
# # ### # ##### # ### # ### ### # ###
#   #   #         #     #     # # ###
# ### ####### ######### # ### # #####
# #   # #   #       #   # # #     ###
# ##### ### ### ##### ##### ##### ###
#           #   #     # #   # #   ###
# ##### ##### ######### # ### #######
#     # #     #       #     #   # ###
####### ##### # ##### # ####### # ###
#     #         #   # #   #       ###
### ######### # # # ### # # ##### ###
#   #         #   #     #   #   # ###
# ######### ######### ### # # ### ###
# #   #     #       #   # #   #   ###
# # # ### ### # ### ### ####### #####
#   #     # # # #     # #     # # ###
### ####### # ####### # # ### ### ###
#         #   #             #     ###
#####################################
#####################################

....instead of this:

#####################################
# #   #   #       # #         #   # #
# # # ### # ### # # # ######### # # #
#   #     # #   #   # #     # # #   #
# # # ##### # ####### # ### # # # ###
# # #   # # #           # # # # # # #
# # # ### # ####### ##### ### # ### #
# # #   #   # # # #     # #   #   # #
# ######### # # # ##### # # ##### # #
# #   #   # #       #       #   #   #
# # # # # # # ##### ######### ##### #
#   # # # # # #     #     #       # #
### # # # # ### ##### ##### ### # # #
# # #   # #   # #           #   #   #
# ### ####### # # ### ####### ##### #
# # # #       #   # # #     # #     #
# # # ##### ####### # # ### # # # ###
# #   #     #   #   # # #   # # # # #
# ### ##### ### # ### ### ### ### # #
#                         #   #     #
#####################################
#####################################

I also tested //maze3d relatively thoroughly, but as it turns out it doesn't have the same bug - so I must have fixed it by accident when upgrading the 2d variant of the algorithm to 3d :P