Fixed mid-round joining clients automatically getting kicked out because they're missing old events
Now they're kicked out if they're not in sync within 10 seconds of joining, TODO: calculate a reasonable timeout based on the amount of events and/or give the client more time if they keep receiving events
This commit is contained in:
@@ -627,13 +627,16 @@ namespace Barotrauma.Networking
|
||||
|
||||
if (gameStarted)
|
||||
{
|
||||
if (!c.inGame && c.NeedsMidRoundSync)
|
||||
if (!c.inGame)
|
||||
{
|
||||
//client joined mid-round and has just started up the game
|
||||
//check which unique messages they've missed
|
||||
entityEventManager.InitClientMidRoundSync(c);
|
||||
if (c.NeedsMidRoundSync)
|
||||
{
|
||||
//client joined mid-round and has just started up the game
|
||||
//check which unique messages they've missed
|
||||
entityEventManager.InitClientMidRoundSync(c);
|
||||
}
|
||||
c.inGame = true;
|
||||
}
|
||||
c.inGame = true;
|
||||
}
|
||||
|
||||
ClientNetObject objHeader;
|
||||
|
||||
Reference in New Issue
Block a user