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:
Regalis
2017-03-13 21:50:01 +02:00
parent 3f1f2d23f2
commit 8c659e2a08
2 changed files with 15 additions and 16 deletions

View File

@@ -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;
}
}