mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-17 05:03:28 +00:00
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>
25 KiB
25 KiB