From a0c78d09d22f5b52d185b0a75bb0abf4e31afa7f Mon Sep 17 00:00:00 2001 From: kevinz000 <2003111+kevinz000@users.noreply.github.com> Date: Mon, 15 Oct 2018 16:07:29 -0700 Subject: [PATCH] Stufffff --- code/controllers/subsystems/timer.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystems/timer.dm b/code/controllers/subsystems/timer.dm index e2d9ec6913..3cd4ffe6ba 100644 --- a/code/controllers/subsystems/timer.dm +++ b/code/controllers/subsystems/timer.dm @@ -122,7 +122,7 @@ SUBSYSTEM_DEF(timer) if (!resumed) timer = null - while (practical_offset <= BUCKET_LEN && head_offset + (practical_offset*world.tick_lag) <= world.time) + while (practical_offset <= BUCKET_LEN && head_offset + ((practical_offset-1)*world.tick_lag) <= world.time) var/datum/timedevent/head = bucket_list[practical_offset] if (!timer || !head || timer == head) head = bucket_list[practical_offset] @@ -170,7 +170,7 @@ SUBSYSTEM_DEF(timer) qdel(timer) continue - if (timer.timeToRun < head_offset + TICKS2DS(practical_offset)) + if (timer.timeToRun < head_offset + TICKS2DS(practical_offset-1)) bucket_resolution = null //force bucket recreation CRASH("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]") if (timer.callBack && !timer.spent)