mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-28 01:11:50 +00:00
Correct assignment dropdowns to always be adjustable by the game controller.
This was SVN commit r15454.
This commit is contained in:
@@ -1286,12 +1286,15 @@ function onGameAttributesChange()
|
||||
var team = getSetting(pData, pDefs, "Team");
|
||||
var civ = getSetting(pData, pDefs, "Civ");
|
||||
|
||||
// Nobody but the controller can assign people
|
||||
pAssignmentText.hidden = g_IsController;
|
||||
pAssignment.hidden = !g_IsController;
|
||||
pAssignmentText.caption = pAssignment.list[pAssignment.selected];
|
||||
|
||||
// For clients or scenarios, hide some player dropdowns
|
||||
// TODO: Allow clients to choose their own civ and team
|
||||
if (!g_IsController || g_GameAttributes.mapType == "scenario")
|
||||
{
|
||||
pAssignmentText.hidden = false;
|
||||
pAssignment.hidden = true;
|
||||
pCivText.hidden = false;
|
||||
pCiv.hidden = true;
|
||||
pTeamText.hidden = false;
|
||||
@@ -1302,12 +1305,9 @@ function onGameAttributesChange()
|
||||
else
|
||||
pCivText.caption = g_CivData[civ].Name;
|
||||
pTeamText.caption = (team !== undefined && team >= 0) ? team+1 : "-";
|
||||
pAssignmentText.caption = pAssignment.list[pAssignment.selected];
|
||||
}
|
||||
else if (g_GameAttributes.mapType != "scenario")
|
||||
{
|
||||
pAssignmentText.hidden = true;
|
||||
pAssignment.hidden = false;
|
||||
pCivText.hidden = true;
|
||||
pCiv.hidden = false;
|
||||
pTeamText.hidden = true;
|
||||
|
||||
Reference in New Issue
Block a user