From 3b798599b63067c2e92aa49906ea66a07ae8de44 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 30 Sep 2008 20:39:50 +0000 Subject: (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. --- src/network/network_type.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/network/network_type.h') diff --git a/src/network/network_type.h b/src/network/network_type.h index 880a8ffae..b0258a37a 100644 --- a/src/network/network_type.h +++ b/src/network/network_type.h @@ -14,11 +14,11 @@ enum { /** - * How many clients can we have? Like.. MAX_PLAYERS - 1 is the amount of - * players that can really play.. so.. a max of 4 spectators.. gives us.. - * MAX_PLAYERS + 3 + * How many clients can we have? Like.. MAX_COMPANIES is the amount of + * companies that can really play.. so.. a max of 3 spectators.. gives us.. + * MAX_COMPANIES + 3 */ - MAX_CLIENTS = MAX_PLAYERS + 3, + MAX_CLIENTS = MAX_COMPANIES + 3, /** Do not change this next line. It should _ALWAYS_ be MAX_CLIENTS + 1 */ MAX_CLIENT_INFO = MAX_CLIENTS + 1, @@ -34,9 +34,9 @@ enum { NETWORK_EMPTY_INDEX = 0, }; -struct NetworkPlayerInfo { +struct NetworkCompanyInfo { char company_name[NETWORK_COMPANY_NAME_LENGTH]; ///< Company name - char password[NETWORK_PASSWORD_LENGTH]; ///< The password for the player + char password[NETWORK_PASSWORD_LENGTH]; ///< The password for the company Year inaugurated_year; ///< What year the company started in Money company_value; ///< The company value Money money; ///< The amount of money the company has @@ -45,7 +45,7 @@ struct NetworkPlayerInfo { bool use_password; ///< Is there a password 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? - char players[NETWORK_PLAYERS_LENGTH]; ///< The players that control this company (Name1, name2, ..) + char clients[NETWORK_CLIENTS_LENGTH]; ///< The clients that control this company (Name1, name2, ..) uint16 months_empty; ///< How many months the company is empty }; @@ -53,9 +53,9 @@ struct NetworkClientInfo { uint16 client_index; ///< Index of the client (same as ClientState->index) char client_name[NETWORK_CLIENT_NAME_LENGTH]; ///< Name of the client byte client_lang; ///< The language of the client - PlayerID client_playas; ///< As which player is this client playing (PlayerID) + CompanyID client_playas; ///< As which company is this client playing (CompanyID) uint32 client_ip; ///< IP-address of the client (so he can be banned) - Date join_date; ///< Gamedate the player has joined + Date join_date; ///< Gamedate the client has joined char unique_id[NETWORK_UNIQUE_ID_LENGTH]; ///< Every play sends an unique id so we can indentify him }; @@ -65,9 +65,9 @@ enum NetworkPasswordType { }; enum DestType { - DESTTYPE_BROADCAST, ///< Send message/notice to all players (All) + DESTTYPE_BROADCAST, ///< Send message/notice to all clients (All) DESTTYPE_TEAM, ///< Send message/notice to everyone playing the same company (Team) - DESTTYPE_CLIENT, ///< Send message/notice to only a certain player (Private) + DESTTYPE_CLIENT, ///< Send message/notice to only a certain client (Private) }; /** Actions that can be used for NetworkTextMessage */ @@ -98,7 +98,7 @@ enum NetworkErrorCode { NETWORK_ERROR_WRONG_REVISION, NETWORK_ERROR_NAME_IN_USE, NETWORK_ERROR_WRONG_PASSWORD, - NETWORK_ERROR_PLAYER_MISMATCH, // Happens in CLIENT_COMMAND + NETWORK_ERROR_COMPANY_MISMATCH, // Happens in CLIENT_COMMAND NETWORK_ERROR_KICKED, NETWORK_ERROR_CHEATER, NETWORK_ERROR_FULL, -- cgit v1.2.3-70-g09d2