Fixed clients who leave a server and re-join becoming desynced and not being kicked by the server.

The clients didn't reset their ChatMessage.LastID, which caused an exception to be thrown when clamping the chatmsg ID server-side, preventing the server from updating the lastRecvEntityEventID of the client later in the method. The server wouldn't kick the client, because ServerEntityEventManager wouldn't handle cases where a client is waiting for an event that doesn't exist anymore.
This commit is contained in:
Regalis
2017-03-14 22:33:33 +02:00
parent ac549f0feb
commit 8d8620047d
3 changed files with 18 additions and 5 deletions

View File

@@ -99,6 +99,7 @@ namespace Barotrauma.Networking
otherClients = new List<Client>();
ChatMessage.LastID = 0;
GameMain.NetLobbyScreen = new NetLobbyScreen();
}