|
@@ -21,48 +21,49 @@ static const uint MAX_CLIENTS = 255;
|
|
|
* the network) are 8 bits. It needs 1 more for the dedicated server.
|
|
|
*/
|
|
|
static const uint MAX_CLIENT_SLOTS = 256;
|
|
|
|
|
|
/**
|
|
|
* Vehicletypes in the order they are send in info packets.
|
|
|
*/
|
|
|
enum NetworkVehicleType {
|
|
|
NETWORK_VEH_TRAIN = 0,
|
|
|
NETWORK_VEH_LORRY,
|
|
|
NETWORK_VEH_BUS,
|
|
|
NETWORK_VEH_PLANE,
|
|
|
NETWORK_VEH_SHIP,
|
|
|
|
|
|
NETWORK_VEH_END
|
|
|
};
|
|
|
|
|
|
/**
|
|
|
* Game type the server can be using.
|
|
|
* Used on the network protocol to communicate with Game Coordinator.
|
|
|
*/
|
|
|
enum ServerGameType : uint8 {
|
|
|
SERVER_GAME_TYPE_LOCAL = 0,
|
|
|
SERVER_GAME_TYPE_PUBLIC,
|
|
|
SERVER_GAME_TYPE_INVITE_ONLY,
|
|
|
};
|
|
|
|
|
|
/** 'Unique' identifier to be given to clients */
|
|
|
enum ClientID : uint32 {
|
|
|
INVALID_CLIENT_ID = 0, ///< Client is not part of anything
|
|
|
CLIENT_ID_SERVER = 1, ///< Servers always have this ID
|
|
|
CLIENT_ID_FIRST = 2, ///< The first client ID
|
|
|
};
|
|
|
|
|
|
/** Indices into the client tables */
|
|
|
typedef uint8 ClientIndex;
|
|
|
|
|
|
/** Indices into the admin tables. */
|
|
|
typedef uint8 AdminIndex;
|
|
|
|
|
|
/** Maximum number of allowed admins. */
|
|
|
static const AdminIndex MAX_ADMINS = 16;
|
|
|
/** An invalid admin marker. */
|
|
|
static const AdminIndex INVALID_ADMIN_ID = UINT8_MAX;
|
|
|
|
|
|
/** Simple calculated statistics of a company */
|
|
|
struct NetworkCompanyStats {
|
|
|
uint16 num_vehicle[NETWORK_VEH_END]; ///< How many vehicles are there of this type?
|
|
|
uint16 num_station[NETWORK_VEH_END]; ///< How many stations are there of this type?
|