mirror of https://github.com/OpenTTD/OpenTTD
(svn r16175) -Fix: Disable the join button in the multiplayer lobby for AI companies, since joining an AI company is not possible.
parent
bc8f31da4e
commit
c8ce3f7ef0
|
@ -23,7 +23,7 @@ enum {
|
||||||
SEND_MTU = 1460, ///< Number of bytes we can pack in a single packet
|
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_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_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'
|
NETWORK_NAME_LENGTH = 80, ///< The maximum length of the server name and map name, in bytes including '\0'
|
||||||
|
|
|
@ -380,6 +380,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_COMPANY_INFO)
|
||||||
company_info->num_vehicle[i] = p->Recv_uint16();
|
company_info->num_vehicle[i] = p->Recv_uint16();
|
||||||
for (int i = 0; i < NETWORK_STATION_TYPES; i++)
|
for (int i = 0; i < NETWORK_STATION_TYPES; i++)
|
||||||
company_info->num_station[i] = p->Recv_uint16();
|
company_info->num_station[i] = p->Recv_uint16();
|
||||||
|
company_info->ai = p->Recv_bool();
|
||||||
|
|
||||||
p->Recv_string(company_info->clients, sizeof(company_info->clients));
|
p->Recv_string(company_info->clients, sizeof(company_info->clients));
|
||||||
|
|
||||||
|
|
|
@ -1344,6 +1344,8 @@ void NetworkSocketHandler::Send_CompanyInformation(Packet *p, const Company *c,
|
||||||
for (int i = 0; i < NETWORK_STATION_TYPES; i++) {
|
for (int i = 0; i < NETWORK_STATION_TYPES; i++) {
|
||||||
p->Send_uint16(stats->num_station[i]);
|
p->Send_uint16(stats->num_station[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p->Send_bool(c->is_ai);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue