Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

[MIRROR] Fix client timers having invalid <1ds waits#1431

Open
SinguloBot wants to merge 2 commits intomasterfrom
upstream-merge-7598
Open

[MIRROR] Fix client timers having invalid <1ds waits#1431
SinguloBot wants to merge 2 commits intomasterfrom
upstream-merge-7598

Conversation

@SinguloBot
Copy link
Contributor

Original PR: BeeStation/BeeStation-Hornet#7598

About The Pull Request

Requested by Ike
image

Original PR: tgstation/tgstation#69356

Timers clamped their waits to >world.tick_lag and rounded it to multiples of the same, but this is invalid for clienttime timers. Clienttime timers have a resolution of one decisecond instead, so we now clamp and round it to that instead. (The stacktrace for negative waits is technically invalid but I didn't care enough to touch it.)

Why It's Good For The Game

These are effectively zero-wait timers, which can mess up the iteration of the clienttime timer queue by being inserted into the past or current tick's list and causing the head/index to desync, potentially leaving spent timers in the queue or firing them again.
Also requested by Ike

Testing Photographs and Procedure

Screenshots&Videos

Put screenshots and videos here with an empty line between the screenshots and the <details> tags.

Changelog

🆑 Dejaku51, out-of-phaze, LemonInTheDark, MrStonedOne
code: Fix client timers having invalid <1ds waits
/:cl:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants