From b18b0a8211b9cf3302e01f40e4e21ed909eacb5d Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Sun, 8 Feb 2015 23:27:58 -0500 Subject: [PATCH] limit plants_lib's per-step time based on dtime (requested limit is 0.2s, but actual tends to be around 1.5s max lag spike) --- plants_lib/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plants_lib/init.lua b/plants_lib/init.lua index f206635..dba332b 100644 --- a/plants_lib/init.lua +++ b/plants_lib/init.lua @@ -326,7 +326,7 @@ end -- a surface during the initial map read stage. function plantslib:generate_block_with_air_checking(dtime) - + if dtime > 0.2 then return end -- don't attempt to populate if lag is too high if #plantslib.blocklist_aircheck > 0 then local minp = plantslib.blocklist_aircheck[1][1] @@ -376,7 +376,7 @@ end -- checking for air during the initial map read stage. function plantslib:generate_block_no_aircheck(dtime) - + if dtime > 0.2 then return end if #plantslib.blocklist_no_aircheck > 0 then local minp = plantslib.blocklist_no_aircheck[1][1]