Syncing RespawnManager state with clients

This commit is contained in:
Regalis
2017-03-20 20:44:20 +02:00
parent dde0160956
commit 2c688f40e3
4 changed files with 113 additions and 38 deletions

View File

@@ -470,10 +470,7 @@ namespace Barotrauma.Networking
DebugConsole.ThrowError("Error while receiving message from server", e);
#endif
}
if (updateTimer > DateTime.Now) return;
if (gameStarted && Screen.Selected == GameMain.GameScreen)
{
endVoteTickBox.Visible = Voting.AllowEndVoting && myCharacter != null;
@@ -482,10 +479,13 @@ namespace Barotrauma.Networking
{
respawnManager.Update(deltaTime);
}
if (updateTimer > DateTime.Now) return;
SendIngameUpdate();
}
else
{
if (updateTimer > DateTime.Now) return;
SendLobbyUpdate();
}