Files
Bubberstation/code/controllers/subsystem/timer.dm
SkyratBot ee14edd6fa [MIRROR] Fix BUCKET_POS for ticklags with non-integer reciprocals [MDB IGNORE] (#19040)
Fix BUCKET_POS for ticklags with non-integer reciprocals (#72928)

## About The Pull Request
If the ticklag setting has a non-integer reciprocal, like 0.4, timers
will be inserted into the past because the fractional component gets
rounded down. This is bad.

Change originally made on a Bay codebase but it should work here too.
Probably no real impact on mainline TG servers because the commonly-used
ticklags like 0.2, 0.25, 0.33333, 0.5, etc. have integer reciprocals, so
dividing by them always just multiplies by an integer.

## Why It's Good For The Game
Inserting timers into a bucket in the past (behind the
`practical_offset`) causes a warning/unexpected behavior and should
probably be avoided; the best fix I can think of for it is just rounding
up so that it's placed in the closest *future* bucket.

Co-authored-by: Penelope Haze <out.of.p.haze@proton.me>
2023-01-31 02:09:59 +00:00

25 KiB