From 99a11badaf80f6f3a7ddaec74ca7fad712b28957 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 19 Jun 2010 16:37:56 +0000 Subject: (svn r19996) -Codechange: Add NetworkVehicleType enum. --- src/network/network_type.h | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'src/network/network_type.h') diff --git a/src/network/network_type.h b/src/network/network_type.h index 08bd7756d..a86ad9948 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -26,10 +26,18 @@ static const uint MAX_CLIENTS = 255; */ static const uint MAX_CLIENT_SLOTS = 256; -/** How many vehicle types we put over the network */ -static const uint NETWORK_VEHICLE_TYPES = 5; -/** How many station types we put over the network */ -static const uint NETWORK_STATION_TYPES = 5; +/** + * 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 +}; /** 'Unique' identifier to be given to clients */ enum ClientID { @@ -43,8 +51,8 @@ typedef uint8 ClientIndex; /** Simple calculated statistics of a company */ struct NetworkCompanyStats { - uint16 num_vehicle[NETWORK_VEHICLE_TYPES]; ///< How many vehicles are there of this type? - uint16 num_station[NETWORK_STATION_TYPES]; ///< How many stations are there of this type? + 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? bool ai; ///< Is this company an AI }; -- cgit v1.2.3-70-g09d2