summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-04-26 19:48:42 +0000
committeryexo <yexo@openttd.org>2009-04-26 19:48:42 +0000
commitc8ce3f7ef03352aba223f235ca9db5800a3f9a1b (patch)
tree9628343ec79cd1e7c0f28440da08f306c8366489 /src/network
parentbc8f31da4e1ab66d67dd4e14f32b2a70ed94de59 (diff)
downloadopenttd-c8ce3f7ef03352aba223f235ca9db5800a3f9a1b.tar.xz
(svn r16175) -Fix: Disable the join button in the multiplayer lobby for AI companies, since joining an AI company is not possible.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/core/config.h2
-rw-r--r--src/network/network_client.cpp1
-rw-r--r--src/network/network_server.cpp2
3 files changed, 4 insertions, 1 deletions
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);
}
/**