diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index 602ccd2df2b..ef6841894d5 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -1,7 +1,7 @@ /// Controls how many buckets should be kept, each representing a tick. (1 minutes worth) #define BUCKET_LEN (world.fps*1*60) /// Helper for getting the correct bucket for a given timer -#define BUCKET_POS(timer) (((round((timer.timeToRun - timer.timer_subsystem.head_offset) / world.tick_lag)+1) % BUCKET_LEN) || BUCKET_LEN) +#define BUCKET_POS(timer) (((ROUND_UP((timer.timeToRun - timer.timer_subsystem.head_offset) / world.tick_lag)+1) % BUCKET_LEN) || BUCKET_LEN) /// Gets the maximum time at which timers will be invoked from buckets, used for deferring to secondary queue #define TIMER_MAX(timer_ss) (timer_ss.head_offset + TICKS2DS(BUCKET_LEN + timer_ss.practical_offset - 1)) /// Max float with integer precision