Don't translate botnames in multiplayer games (so names are in english instead of the language of the host). Refs #3307

This was SVN commit r17382.
This commit is contained in:
elexis 2015-12-04 23:54:45 +00:00
parent bbc325fb5a
commit 7316473921

View File

@ -1129,7 +1129,10 @@ function launchGame()
if (g_GameAttributes.mapType === "scenario" || !g_GameAttributes.settings.PlayerData[i].AI)
continue;
let chosenName = translate(g_CivData[chosenCiv].AINames[Math.floor(Math.random() * g_CivData[chosenCiv].AINames.length)]);
let chosenName = g_CivData[chosenCiv].AINames[Math.floor(Math.random() * g_CivData[chosenCiv].AINames.length)];
if (!g_IsNetworked)
chosenName = translate(chosenName);
// Count how many players use the chosenName
let usedName = g_GameAttributes.settings.PlayerData.filter(pData => pData.Name && pData.Name.indexOf(chosenName) !== -1).length;