Fixes #5394 Spawnpoint dropdown count
Fixes where the spawn point dropdown would show the same number of spawn points as the number of players rather than the actual number of available spawn points.
This commit is contained in:
@@ -422,7 +422,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
|
||||
{
|
||||
var dropdown = parent.Get<DropDownButtonWidget>("SPAWN");
|
||||
dropdown.IsDisabled = () => s.LockSpawn || orderManager.LocalClient.IsReady;
|
||||
dropdown.OnMouseDown = _ => ShowSpawnDropDown(dropdown, c, orderManager, Enumerable.Range(0, map.PlayerCount + 1)
|
||||
dropdown.OnMouseDown = _ => ShowSpawnDropDown(dropdown, c, orderManager, Enumerable.Range(0, map.SpawnPoints.Count + 1)
|
||||
.Except(orderManager.LobbyInfo.Clients.Where(client => client != c && client.SpawnPoint != 0).Select(client => client.SpawnPoint)));
|
||||
dropdown.GetText = () => (c.SpawnPoint == 0) ? "-" : Convert.ToChar('A' - 1 + c.SpawnPoint).ToString();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user