Break infinite loop if unable to find any mob to spawn

This commit is contained in:
jordan4ibanez 2021-04-22 18:18:57 -04:00
parent 1fc15e92fe
commit d0d128c1d8

View file

@ -615,6 +615,12 @@ if mobs_spawn then
local repeat_mob_search = true local repeat_mob_search = true
repeat repeat
--do not infinite loop
if #mob_library_worker_table <= 0 then
--print("breaking infinite loop")
break
end
local skip = false local skip = false
--use this for removing table elements of mobs that do not match --use this for removing table elements of mobs that do not match