New login process + a little bit of cleanup

No reliability required :) Will get to the client soon
This commit is contained in:
juanjp600
2016-08-31 18:26:17 -03:00
parent d561805010
commit b9a246ca68
4 changed files with 258 additions and 75 deletions

View File

@@ -9,6 +9,23 @@ using Barotrauma.Items.Components;
namespace Barotrauma.Networking
{
enum ClientPacketHeader
{
REQUEST_AUTH, //ask the server if a password is needed, if so we'll get nonce for encryption
REQUEST_INIT, //ask the server to give you initialization
UPDATE_LOBBY, //update state in lobby
UPDATE_INGAME_ALIVE, //update state ingame while alive (allow character input)
UPDATE_INGAME_SPECTATING, //update state ingame while spectating/dead
}
enum ServerPacketHeader
{
AUTH_RESPONSE, //tell the player if they require a password to log in
AUTH_FAILURE, //the server won't authorize player yet, however connection is still alive
UPDATE_LOBBY, //update state in lobby (votes and chat messages)
UPDATE_INGAME_ALIVE, //update state ingame while alive (character input and chat messages)
UPDATE_INGAME_SPECTATING, //update state ingame while spectating/dead (chat messages)
}
enum VoteType
{
Unknown,