mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-28 01:52:16 +00:00
Delay the exit message box in multiplayer games until after the synchronization is finished, to avoid stacking message boxes.
This was SVN commit r18857.
This commit is contained in:
@@ -580,6 +580,8 @@ function handleNetStatusMessage(message)
|
||||
return;
|
||||
}
|
||||
|
||||
g_IsNetworkedActive = message.status == "active";
|
||||
|
||||
let label = Engine.GetGUIObjectByName("netStatus");
|
||||
let statusMessage = g_StatusMessageTypes[message.status](message);
|
||||
label.caption = statusMessage;
|
||||
|
||||
@@ -35,6 +35,12 @@ var g_IsController;
|
||||
*/
|
||||
var g_IsNetworked = false;
|
||||
|
||||
/**
|
||||
* Whether we have finished the synchronization and
|
||||
* can start showing simulation related message boxes.
|
||||
*/
|
||||
var g_IsNetworkedActive = false;
|
||||
|
||||
/**
|
||||
* True if the connection to the server has been lost.
|
||||
*/
|
||||
@@ -685,6 +691,9 @@ function onSimulationUpdate()
|
||||
*/
|
||||
function confirmExit()
|
||||
{
|
||||
if (g_IsNetworked && !g_IsNetworkedActive)
|
||||
return;
|
||||
|
||||
closeOpenDialogs();
|
||||
|
||||
let subject = g_PlayerStateMessages[g_ConfirmExit] + "\n" +
|
||||
|
||||
Reference in New Issue
Block a user