diff --git a/internal.lua b/internal.lua index 5af8b0d..a493d33 100644 --- a/internal.lua +++ b/internal.lua @@ -289,8 +289,17 @@ function adv_spawning.time_over(minimum) local now = adv_spawning.gettime() local time_passed = now - adv_spawning.quota_starttime - - assert(time_passed >= 0) + + if (time_passed < 0) then + if adv_spawning.timebackwardwarning ~= true then + core.log("error", "ADV_SPAWNING: Error either there's a bug in time" + .." calculation\n or your time just went backwards: old timestamp: " + .. adv_spawning.quota_starttime .. " current_time: " .. now .. "\n") + adv_spawning.timebackwardwarning = true + + end + return true + end return (adv_spawning.quota_left - time_passed) < minimum end