mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-12 10:42:37 +00:00
## About The Pull Request Ok so this explanation is gonna suck a bit I'm sorry. I was sittin in coderbus and @flleeppyy mentioned this problem where SSticker counted down to roundstart significantly faster then it should. I poked on tg, and saw the same behavior. I did further poking, and realized that despite wait being 20ds, the actual delay between fires was 15ds. I'll spare you the rest of the story, it turned out that SSticker's next_fire was set to 0 at the start instead of world.time, so when we did the KEEP_TIMING thing of incrementing next_fire by wait, we were pretty much always going to be trying to fire on the very next tick. This was prevented by the existing sanity check which limits how fast KEEP_TIMING subsystems are allowed to try and recover their tick locked nature, reducing it to 15ds instead of 1ds delay. The actual problem here was next_fire not being set properly, which is normally handled by a block in the while(1) block that checks to see if the run level has changed. Unfortunately if you have the starting run level, this never happens. This impacts EXACTLY SSticker, and nothing else. For now at least. Solution is to write similar code in Loop's setup block, which brings SSticker's roundstart timer back into parity with real life. This has the nice side effect of achieving the randomized starting delays we want for subsystems, to prevent clumping. See discussion on #71730 for more on that. I'm going straight off the dome on this one. Didn't wanna bug mto about it if I feel comfortable and all. Please note, this does mean the roundstart lobby time is slower now, it's accurate but it's slower. Might need config changes idk. I also added some code that checks to see if the subsystem we're randomizing is a ticker or not, I'm kind of dubious on the "wait is actually TICKS for ONLY TICKER" thing but I'm not comfortable enough to change that yet. ## Why It's Good For The Game When we say the round starts in 5 minutes, it should actually do that. ## Changelog 🆑 fix: Fixed a timing issue with SS_KEEP_TIMING subsystems, which impacts exactly SSticker. TLDR is roundstart will now actually take the time it says it does, instead of 75% of it. config: The roundstart delay config is now accurate, so you may want to decrease it to not overlengthen lobby time. IDK you decide. /🆑