Add a player list to the MP server browser.

This commit is contained in:
Paul Chote
2017-12-25 13:20:13 +00:00
committed by reaperrr
parent 3ba610b535
commit bccc0f8f17
11 changed files with 383 additions and 104 deletions

View File

@@ -22,7 +22,6 @@ namespace OpenRA.Mods.Common.Widgets
public class SpawnOccupant
{
public readonly HSLColor Color;
public readonly int ClientIndex;
public readonly string PlayerName;
public readonly int Team;
public readonly string Faction;
@@ -31,7 +30,6 @@ namespace OpenRA.Mods.Common.Widgets
public SpawnOccupant(Session.Client client)
{
Color = client.Color;
ClientIndex = client.Index;
PlayerName = client.Name;
Team = client.Team;
Faction = client.Faction;
@@ -41,12 +39,20 @@ namespace OpenRA.Mods.Common.Widgets
public SpawnOccupant(GameInformation.Player player)
{
Color = player.Color;
ClientIndex = player.ClientIndex;
PlayerName = player.Name;
Team = player.Team;
Faction = player.FactionId;
SpawnPoint = player.SpawnPoint;
}
public SpawnOccupant(GameClient player, bool suppressFaction)
{
Color = player.Color;
PlayerName = player.Name;
Team = player.Team;
Faction = !suppressFaction ? player.Faction : null;
SpawnPoint = player.SpawnPoint;
}
}
public class MapPreviewWidget : Widget