Ticket #2275: menu.js.v2.patch

File menu.js.v2.patch, 1.1 KB (added by Michael, 10 years ago)

Now working in some more cases. Normal pause function in MP game remains untouched.

  • menu.js

     
    111111{
    112112    closeMenu();
    113113    closeOpenDialogs();
    114     openSettings(true);
     114    openSettings();
    115115}
    116116
    117117function chatMenuButton()
     
    180180    Engine.PushGuiPage("page_savegame.xml", {"gameDataCallback": getSavedGameData, "closeCallback": resumeGame});
    181181}
    182182
    183 function openSettings(pause)
     183function openSettings()
    184184{
    185185    getGUIObjectByName("settingsDialogPanel").hidden = false;
    186     if (pause)
    187         pauseGame();
     186    pauseGame();
    188187}
    189188
    190189function closeSettings(resume)
     
    523522
    524523function pauseGame()
    525524{
    526     getGUIObjectByName("pauseButtonText").caption = RESUME;
    527     getGUIObjectByName("pauseOverlay").hidden = false;
    528     setPaused(true);
     525    if (!g_IsNetworked)  // just pause the game in single player mode; ref #2275
     526    {   
     527        getGUIObjectByName("pauseButtonText").caption = RESUME;
     528        getGUIObjectByName("pauseOverlay").hidden = false;
     529        setPaused(true);
     530    }
    529531}
    530532
    531533function resumeGame()