A ClientState represents the state in which both the launcher and game are, in relation to each other.
ClientIdentification = 0xC0
: Game connects to the launcher, sends mod version, game version. Launcher responds with implementation info.Login = 0xC1
: Launcher tells game if already logged in, if not, game sends back login details. Repeat until logged in. Launcher sends successful login response back to the game.QuickJoin = 0xC2
: Launcher tells the game whether there's already a server to connect to. If not, waits for the game to ask for something.Browsing = 0xC3
: Game can request the serverlist, or tell the launcher to connect. If so, jump to ServerIdentification.ServerIdentification = 0xC4
: Launcher sends game the server version, implementation, etc. There are several failure modes here: Failed to connect, failed to resolve, protocol version rejected, .. The launcher updates the game on changes and errors.ServerAuthentication = 0xC5
: Launcher relays the message (ok, failed, rejected) of the authentication.ServerModDownload = 0xC6
: Launcher sends status of each mod download, by sending a list of all mods and their download statuses, size, progress, speed, etc. Then sends the map to the game, and the game starts loading the map. At any time, the game can tell the launcher to go back to Browsing for any reason (this closes the connection to the server cleanly).ServerSessionSetup = 0xC7
: Get and parse players and vehicles from launcher, and send the ready packet ASAP - before spawning anything - to ensure packets are also sent asap. This may need work.ServerPlaying = 0xC8
: ... todoServerLeaving = 0xC9
: ... todo