Update client.UnreceivedEntityEventCount on every event write

I noticed that if the main event IDs went over 10000 and there were more than 450 unique events, the server would sometimes skip the next event the client needed. Sometimes the client would also not realize that the last event it received was the final init event, so it would reject all further events because of a huge ID discrepancy. The init events will likely need to be reworked, but updating UnreceivedEntityEventCount seems to help somewhat.
This commit is contained in:
juanjp600
2017-04-06 12:37:38 -03:00
parent bfe043c154
commit 4ad373294c
4 changed files with 14 additions and 4 deletions
@@ -570,6 +570,7 @@ namespace Barotrauma.Networking
case "You have been banned from the server":
case "You have been kicked from the server":
case "You have been disconnected because of excessive desync":
case "You have been disconnected because syncing your client with the server took too long.":
var msgBox = new GUIMessageBox("CONNECTION LOST", disconnectMsg);
msgBox.Buttons[0].OnClicked += ReturnToServerList;
break;