Ticket #3804: gamesetup.js.patch

File gamesetup.js.patch, 963 bytes (added by Vladislav Belov, 8 years ago)
  • binaries/data/mods/public/gui/gamesetup/gamesetup.js

     
    15901590
    15911591        // Transfer the AI from the target slot to the current slot.
    15921592        g_GameAttributes.settings.PlayerData[playerID - 1].AI = g_GameAttributes.settings.PlayerData[newSlot].AI;
     1593
     1594        // swap civilizations only if they aren't fixed
     1595        if (g_GameAttributes.mapType != 'scenario')
     1596        {
     1597            let playerCiv = g_GameAttributes.settings.PlayerData[playerID - 1].Civ;
     1598            let newPlayerCiv = g_GameAttributes.settings.PlayerData[newSlot].Civ;
     1599            g_GameAttributes.settings.PlayerData[playerID - 1].Civ = newPlayerCiv;
     1600            g_GameAttributes.settings.PlayerData[newSlot].Civ = playerCiv;
     1601
     1602            if (!g_IsInGuiUpdate)
     1603                updateGameAttributes();
     1604        }
    15931605    }
    15941606
    15951607    if (g_IsNetworked)