1
0
mirror of https://github.com/minetest/minetest_game.git synced 2024-12-22 23:10:17 +01:00

Dungeon loot: Reduce maximum processed rooms to 8

This commit is contained in:
paramat 2018-01-21 20:23:29 +00:00 committed by paramat
parent 41a4073d4c
commit ee6d2f2468

View File

@ -131,8 +131,8 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
local rand = PcgRandom(noise3d_integer(noise, poslist[1])) local rand = PcgRandom(noise3d_integer(noise, poslist[1]))
local candidates = {} local candidates = {}
-- process at most 16 rooms to keep runtime of this predictable -- process at most 8 rooms to keep runtime of this predictable
local num_process = math.min(#poslist, 16) local num_process = math.min(#poslist, 8)
for i = 1, num_process do for i = 1, num_process do
local room = find_walls(poslist[i]) local room = find_walls(poslist[i])
-- skip small rooms and everything that doesn't at least have 3 walls -- skip small rooms and everything that doesn't at least have 3 walls