The server keeps track of which ID a client is going to switch to when midround syncing is done, and switches the ID immediately when the client is in sync (instead of waiting for the client to report the new ID).

Fixes clients occasionally getting kicked out the moment they're in sync, because their latest received ID is still set to the ID of the last unique event and the server thinks they're requesting some old event that doesn't necessarily exist anymore.

+ added a debug command that creates a ton of entity events
This commit is contained in:
Regalis
2017-04-08 20:09:05 +03:00
parent f863eb331d
commit e94a50a29a
4 changed files with 42 additions and 4 deletions

View File

@@ -50,6 +50,7 @@ namespace Barotrauma.Networking
public bool NeedsMidRoundSync;
//how many unique events the client missed before joining the server
public UInt16 UnreceivedEntityEventCount;
public UInt16 FirstNewEventID;
private List<Client> kickVoters;