Server checks if midround syncing is needed when a client is in the game (i.e. loaded the sub, etc), not when the client requests the start message. Some clients take longer to start the round than others, and they may miss unique messages even if they were in the lobby when the round started.
Clients also get extra 10 seconds to receive newly created events after the midround syncing is done
This commit is contained in:
@@ -565,7 +565,6 @@ namespace Barotrauma.Networking
|
||||
//game already started -> send start message immediately
|
||||
if (gameStarted)
|
||||
{
|
||||
connectedClient.NeedsMidRoundSync = true;
|
||||
SendStartMessage(roundStartSeed, Submarine.MainSub, GameMain.GameSession.gameMode.Preset, connectedClient);
|
||||
}
|
||||
}
|
||||
@@ -655,12 +654,8 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
if (!c.inGame)
|
||||
{
|
||||
if (c.NeedsMidRoundSync)
|
||||
{
|
||||
//client joined mid-round and has just started up the game
|
||||
//check which unique messages they've missed
|
||||
entityEventManager.InitClientMidRoundSync(c);
|
||||
}
|
||||
//check if midround syncing is needed due to missed unique events
|
||||
entityEventManager.InitClientMidRoundSync(c);
|
||||
c.inGame = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user