Basic player input syncing

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.
This commit is contained in:
juanjp600
2016-09-22 21:20:46 -03:00
parent edab86f730
commit 44e12ffed2
6 changed files with 300 additions and 36 deletions

View File

@@ -14,7 +14,7 @@ namespace Barotrauma.Networking
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, //update state ingame while alive
UPDATE_INGAME, //update state ingame
RESPONSE_STARTGAME //tell the server whether you're ready to start
}
@@ -33,7 +33,7 @@ namespace Barotrauma.Networking
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, //update state ingame while alive (character input and chat messages)
UPDATE_INGAME, //update state ingame (character input and chat messages)
QUERY_STARTGAME, //ask the clients whether they're ready to start
STARTGAME //start a new round