mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
Break infinite loop if unable to find any mob to spawn
This commit is contained in:
parent
1fc15e92fe
commit
d0d128c1d8
1 changed files with 6 additions and 0 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue