Kick clients who don't have the map when the host force-starts.

This commit is contained in:
Paul Chote
2014-03-13 17:07:41 +13:00
parent f5f84244eb
commit fcb3d7347a
6 changed files with 41 additions and 18 deletions

View File

@@ -81,7 +81,7 @@ namespace OpenRA.Network
get { return Clients.Count(c => c.Bot == null) == 1; }
}
public enum ClientState { NotReady, Ready, Disconnected = 1000 }
public enum ClientState { NotReady, Invalid, Ready, Disconnected = 1000 }
public class Client
{
@@ -93,13 +93,14 @@ namespace OpenRA.Network
public int SpawnPoint;
public string Name;
public string IpAddress;
public ClientState State;
public ClientState State = ClientState.Invalid;
public int Team;
public string Slot; // slot ID, or null for observer
public string Bot; // Bot type, null for real clients
public int BotControllerClientIndex; // who added the bot to the slot
public bool IsAdmin;
public bool IsReady { get { return State == ClientState.Ready; } }
public bool IsInvalid { get { return State == ClientState.Invalid; } }
public bool IsObserver { get { return Slot == null; } }
public int Latency = -1;
public int LatencyJitter = -1;