Give players and bots their actual name during the game, for better experience.
Patch by elexis, fixes #3253 This was SVN commit r16838.
This commit is contained in:
parent
542061dbed
commit
cf21c34e3f
@ -1101,6 +1101,13 @@ function launchGame()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Copy playernames from initial player assignment to the settings
|
||||||
|
for (let guid of g_PlayerAssignments)
|
||||||
|
{
|
||||||
|
let player = g_PlayerAssignments[guid];
|
||||||
|
g_GameAttributes.settings.PlayerData[player.player - 1].Name = player.name;
|
||||||
|
}
|
||||||
|
|
||||||
if (g_IsNetworked)
|
if (g_IsNetworked)
|
||||||
{
|
{
|
||||||
Engine.SetNetworkGameAttributes(g_GameAttributes);
|
Engine.SetNetworkGameAttributes(g_GameAttributes);
|
||||||
|
@ -108,6 +108,14 @@ function pollAndHandleNetworkClient()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case "start":
|
case "start":
|
||||||
|
|
||||||
|
// Copy playernames from initial player assignment to the settings
|
||||||
|
for (let guid of g_PlayerAssignments)
|
||||||
|
{
|
||||||
|
let player = g_PlayerAssignments[guid];
|
||||||
|
g_GameAttributes.settings.PlayerData[player.player - 1].Name = player.name;
|
||||||
|
}
|
||||||
|
|
||||||
Engine.SwitchGuiPage("page_loading.xml", {
|
Engine.SwitchGuiPage("page_loading.xml", {
|
||||||
"attribs": g_GameAttributes,
|
"attribs": g_GameAttributes,
|
||||||
"isNetworked" : true,
|
"isNetworked" : true,
|
||||||
|
Loading…
Reference in New Issue
Block a user