From c8ce3f7ef03352aba223f235ca9db5800a3f9a1b Mon Sep 17 00:00:00 2001 From: yexo Date: Sun, 26 Apr 2009 19:48:42 +0000 Subject: (svn r16175) -Fix: Disable the join button in the multiplayer lobby for AI companies, since joining an AI company is not possible. --- src/network/core/config.h | 2 +- src/network/network_client.cpp | 1 + src/network/network_server.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/network/core/config.h b/src/network/core/config.h index bcd85f594..e7d69f3a5 100644 --- a/src/network/core/config.h +++ b/src/network/core/config.h @@ -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' diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp index 2f5a040a0..c5ac55961 100644 --- a/src/network/network_client.cpp +++ b/src/network/network_client.cpp @@ -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)); diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index bd0b161c7..2e2971fa7 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -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); } /** -- cgit v1.2.3-54-g00ecf