Fix a late joining client not knowing if the lobby has been paused (#1199)

* Fix client not knowing that the lobby is paused when joining after the pause

Also fixes a client thinking that a lobby is paused when joining a new one after leaving a previously paused one

* Add server announcement to delaying and pausing round start
This commit is contained in:
DrSmugleaf
2020-06-23 21:30:37 +02:00
committed by GitHub
parent 7089b60738
commit 78085855db
3 changed files with 11 additions and 0 deletions

View File

@@ -437,6 +437,8 @@ namespace Content.Server.GameTicking
lobbyCountdownMessage.Paused = Paused;
_netManager.ServerSendToAll(lobbyCountdownMessage);
_chatManager.DispatchServerAnnouncement($"Round start has been delayed for {time.TotalSeconds} seconds.");
return true;
}
@@ -463,6 +465,10 @@ namespace Content.Server.GameTicking
lobbyCountdownMessage.Paused = Paused;
_netManager.ServerSendToAll(lobbyCountdownMessage);
_chatManager.DispatchServerAnnouncement(Paused
? "Round start has been paused."
: "Round start countdown is now resumed.");
return true;
}
@@ -838,6 +844,7 @@ namespace Content.Server.GameTicking
msg.IsRoundStarted = RunLevel != GameRunLevel.PreRoundLobby;
msg.StartTime = _roundStartTimeUtc;
msg.YouAreReady = ready;
msg.Paused = Paused;
return msg;
}