(svn r16175) -Fix: Disable the join button in the multiplayer lobby for AI companies, since joining an AI company is not possible.

This commit is contained in:
yexo 2009-04-26 19:48:42 +00:00
parent bc8f31da4e
commit c8ce3f7ef0
3 changed files with 4 additions and 1 deletions

View File

@ -23,7 +23,7 @@ enum {
SEND_MTU = 1460, ///< Number of bytes we can pack in a single packet
NETWORK_GAME_INFO_VERSION = 4, ///< What version of game-info do we use?
NETWORK_COMPANY_INFO_VERSION = 5, ///< What version of company info is this?
NETWORK_COMPANY_INFO_VERSION = 6, ///< What version of company info is this?
NETWORK_MASTER_SERVER_VERSION = 2, ///< What version of master-server-protocol do we use?
NETWORK_NAME_LENGTH = 80, ///< The maximum length of the server name and map name, in bytes including '\0'

View File

@ -380,6 +380,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_COMPANY_INFO)
company_info->num_vehicle[i] = p->Recv_uint16();
for (int i = 0; i < NETWORK_STATION_TYPES; i++)
company_info->num_station[i] = p->Recv_uint16();
company_info->ai = p->Recv_bool();
p->Recv_string(company_info->clients, sizeof(company_info->clients));

View File

@ -1344,6 +1344,8 @@ void NetworkSocketHandler::Send_CompanyInformation(Packet *p, const Company *c,
for (int i = 0; i < NETWORK_STATION_TYPES; i++) {
p->Send_uint16(stats->num_station[i]);
}
p->Send_bool(c->is_ai);
}
/**