Fucking whoops
In #27742 I made it so sanitization of character profiles was moved to be *after* database load. Except that means I moved it to be after the copy of all character profiles got sent to the client.
Move the sending to *also* be in that second load stage, and rename it. Fixes the issue.
First bug: if an error occured during pref loading code, it would fail. If the person then readied up, it would likely cause the round to fail to start.
Why could they ready up? The code only checks that the prefs finished loading, not that they finished loading *successfully*. Whoops.
Anyways, now people get kicked if their prefs fail to load. And I improved the error handling.
Second bug: if a user disconnected while their prefs were loading, it would cause an exception. This exception would go unobserved on lobby servers or raise through gameticker on non-lobby servers.
This happened even on a live server once and then triggered the first bug, but idk how.
Fixed this by properly plumbing through cancellation into the preferences loading code. The stuff is now cancelled properly.
Third bug: if somebody has a loadout item with a playtime requirement active, load-time sanitization of player prefs could run into a race condition because the sanitization can happen *before* play time was loaded.
Fixed by moving pref sanitizations to a later stage in the load process.
* Mega Antag Refactor
* last minute delta save
* more workshopping
* more shit
* ok tested this for once
* okkkkk sure
* generic delays for starting rules
* well darn
* nukies partially
* ouagh
* ballin' faded and smonkin wed
* obliterated the diff
* Spread my arms and soak up congratulations
* I've got plenty of love, but nothing to show for it
* but there’s too much sunlight
Shining on my laptop monitor, so I
Can’t see anything with any amount of clarity
* ok this junk
* OOK!
* fubar
* most of sloth's review
* oh boy
* eek
* hell yea!
* ASDFJASDJFvsakcvjkzjnhhhyh