mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
Correct error message when the host disconnects
After 78900842b1, the following message was shown to clients when the
host disconnected during game setup:
"Lost connection to the server.
[Invalid value undefined]"
This patch fixes that.
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ class ChatInputPanel
|
||||
{
|
||||
if (message.status == "disconnected")
|
||||
{
|
||||
reportDisconnect(message.reason, true);
|
||||
reportDisconnect(message, true);
|
||||
this.chatInput.hidden = true;
|
||||
this.chatSubmitButton.hidden = true;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ function pollAndHandleNetworkClient(loadSavedGame)
|
||||
if (message.reason === 16)
|
||||
reportHandshakeDisconnect(message.mismatch_type, message.client_mismatch, message.server_mismatch);
|
||||
else
|
||||
reportDisconnect(message.reason, false);
|
||||
reportDisconnect(message, false);
|
||||
return true;
|
||||
|
||||
default:
|
||||
|
||||
@@ -38,7 +38,7 @@ NetworkStatusOverlay.prototype.StatusCaption = {
|
||||
"authenticated": msg => translate("Connection to the server has been authenticated."),
|
||||
"connected": msg => translate("Connected to the server."),
|
||||
"disconnected": msg => translate("Connection to the server has been lost.") + "\n" +
|
||||
getDisconnectReason(msg.reason, true),
|
||||
getDisconnectReason(msg.reason),
|
||||
"waiting_for_players": msg => translate("Waiting for players to connect:"),
|
||||
"join_syncing": msg => translate("Synchronizing gameplay with other players…"),
|
||||
"active": msg => ""
|
||||
|
||||
Reference in New Issue
Block a user