From 0ea4cb3848d26eabcf8ad3094ca45bd72906ecdd Mon Sep 17 00:00:00 2001 From: Vanessa Dannenberg Date: Tue, 6 Apr 2021 10:00:16 -0400 Subject: [PATCH] don't bother checking dtime during globalstep it's enough to rely in the run ratio. --- init.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 37b1b34..eabe964 100644 --- a/init.lua +++ b/init.lua @@ -481,17 +481,13 @@ end -- "Play" them back, populating them with new stuff in the process -biome_lib.dtime_limit = tonumber(minetest.settings:get("biome_lib_dtime_limit")) or 0.5 local rr = tonumber(minetest.settings:get("biome_lib_queue_run_ratio")) or -100 biome_lib.queue_run_ratio = 100 - rr biome_lib.entries_per_step = math.max(-rr, 1) minetest.register_globalstep(function(dtime) - if math.random(100) > biome_lib.queue_run_ratio - or dtime > biome_lib.dtime_limit then - return - end + if math.random(100) > biome_lib.queue_run_ratio then return end for s = 1, biome_lib.entries_per_step do biome_lib.generate_block() end