There's currently a bug where the inputs might be read out of order or more than once, which leads to desync. I'll feel really dumb when I find what's going on here.
Also, I'm using placeholder player spawning because CharacterInfo doesn't seem to be fully functional yet.
Looks like a lot more than just netcode is getting rewritten. Removing coroutines because there are better ways of handling asynchronous tasks, removing filestream because that's to be reimplemented later
These functions needed to be replaced because they rely heavily on reliability.
Instead, new functions called (Write/Read)Data(Server/Client) will be added.
Separating client and server code into completely separate functions will help ensure that proper security checks are performed.
- clients don't send server passwords as plaintext: the server sends a nonce which the client encrypt using the password as the key
- IPs are visible in netstats
- amount of client jobpreferences limited to 3 at the servers side
- sanitizing client names
- batteries are restored to full capacity and all items repaired when resetting the respawn shuttle
- some respawnmanager refactoring (characters/items arent created in WriteNetworkEvent anymore)
- syncing respawnmanager state with clients who join mid-round
- LOS is turned back on when respawning
- after receiving a StartGame message, clients will wait until the game is loaded before reading new messages from the server
- the Item(prefab, position, submarine) constructor uses the position as the center of the item, not as top-left corner
- syncing items spawned/removed mid-round
- syncing characters spawned mid-round (through the console or by respawning)
- making sure that item IDs of the spawned characters match
- syncing wall damage
- small AICharacter syncing optimizations
- respawning can be disabled in server setting
- netstats show the total amount of bytes sent for each networkevent type
- fixed duplicate hulls/gaps being placed at docking ports when saving and loading
- fixed linkedsubmarines moving when saving and reloading if the center of the wall vertices isn't he same as the center of the sub
- moving docked submarines along with the main sub when syncing the position
- characters are killed when the client controlling them disconnects (+ cause of death: disconnected)
- fixed the description box in server lobby
- respawn info texts
- camera clamped to the the upper edge of the level
- fixed submarinebody being generated from all walls (and not just the ones belonging to that specific sub)