src/network/network.h
branchNewGRF_ports
changeset 6871 5a9dc001e1ad
parent 6870 ca3fd1fbe311
child 6872 1c4a4a609f85
equal deleted inserted replaced
6870:ca3fd1fbe311 6871:5a9dc001e1ad
    69 	char client_name[NETWORK_CLIENT_NAME_LENGTH];   // Name of the client
    69 	char client_name[NETWORK_CLIENT_NAME_LENGTH];   // Name of the client
    70 	byte client_lang;                               // The language of the client
    70 	byte client_lang;                               // The language of the client
    71 	PlayerID client_playas;                         // As which player is this client playing (PlayerID)
    71 	PlayerID client_playas;                         // As which player is this client playing (PlayerID)
    72 	uint32 client_ip;                               // IP-address of the client (so he can be banned)
    72 	uint32 client_ip;                               // IP-address of the client (so he can be banned)
    73 	Date join_date;                                 // Gamedate the player has joined
    73 	Date join_date;                                 // Gamedate the player has joined
    74 	char unique_id[NETWORK_NAME_LENGTH];            // Every play sends an unique id so we can indentify him
    74 	char unique_id[NETWORK_UNIQUE_ID_LENGTH];       // Every play sends an unique id so we can indentify him
    75 };
    75 };
    76 
    76 
    77 enum NetworkJoinStatus {
    77 enum NetworkJoinStatus {
    78 	NETWORK_JOIN_STATUS_CONNECTING,
    78 	NETWORK_JOIN_STATUS_CONNECTING,
    79 	NETWORK_JOIN_STATUS_AUTHORIZING,
    79 	NETWORK_JOIN_STATUS_AUTHORIZING,
   125 
   125 
   126 VARDEF char _network_player_name[NETWORK_CLIENT_NAME_LENGTH];
   126 VARDEF char _network_player_name[NETWORK_CLIENT_NAME_LENGTH];
   127 VARDEF char _network_default_ip[NETWORK_HOSTNAME_LENGTH];
   127 VARDEF char _network_default_ip[NETWORK_HOSTNAME_LENGTH];
   128 
   128 
   129 VARDEF uint16 _network_own_client_index;
   129 VARDEF uint16 _network_own_client_index;
   130 VARDEF char _network_unique_id[NETWORK_NAME_LENGTH]; // Our own unique ID
   130 VARDEF char _network_unique_id[NETWORK_UNIQUE_ID_LENGTH]; // Our own unique ID
   131 
   131 
   132 VARDEF uint32 _frame_counter_server; // The frame_counter of the server, if in network-mode
   132 VARDEF uint32 _frame_counter_server; // The frame_counter of the server, if in network-mode
   133 VARDEF uint32 _frame_counter_max; // To where we may go with our clients
   133 VARDEF uint32 _frame_counter_max; // To where we may go with our clients
   134 
   134 
   135 VARDEF uint32 _last_sync_frame; // Used in the server to store the last time a sync packet was sent to clients.
   135 VARDEF uint32 _last_sync_frame; // Used in the server to store the last time a sync packet was sent to clients.
   145 VARDEF char _network_server_bind_ip_host[NETWORK_HOSTNAME_LENGTH];
   145 VARDEF char _network_server_bind_ip_host[NETWORK_HOSTNAME_LENGTH];
   146 VARDEF bool _is_network_server; // Does this client wants to be a network-server?
   146 VARDEF bool _is_network_server; // Does this client wants to be a network-server?
   147 VARDEF char _network_server_name[NETWORK_NAME_LENGTH];
   147 VARDEF char _network_server_name[NETWORK_NAME_LENGTH];
   148 VARDEF char _network_server_password[NETWORK_PASSWORD_LENGTH];
   148 VARDEF char _network_server_password[NETWORK_PASSWORD_LENGTH];
   149 VARDEF char _network_rcon_password[NETWORK_PASSWORD_LENGTH];
   149 VARDEF char _network_rcon_password[NETWORK_PASSWORD_LENGTH];
       
   150 VARDEF char _network_default_company_pass[NETWORK_PASSWORD_LENGTH];
   150 
   151 
   151 VARDEF uint16 _network_max_join_time;             ///< Time a client can max take to join
   152 VARDEF uint16 _network_max_join_time;             ///< Time a client can max take to join
   152 VARDEF bool _network_pause_on_join;               ///< Pause the game when a client tries to join (more chance of succeeding join)
   153 VARDEF bool _network_pause_on_join;               ///< Pause the game when a client tries to join (more chance of succeeding join)
   153 
   154 
   154 VARDEF uint16 _redirect_console_to_client;
   155 VARDEF uint16 _redirect_console_to_client;