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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user