summaryrefslogtreecommitdiff
path: root/src/network/network_client.h
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-01 14:21:33 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-01 18:30:08 +0200
commit83985fe26f1ad87df709f122f74e5d50485095fa (patch)
tree9394e4f04a96f49b8d70dae117810e737cc1d323 /src/network/network_client.h
parent39c51c35f4566553ec3c6c273c2642d796070521 (diff)
downloadopenttd-83985fe26f1ad87df709f122f74e5d50485095fa.tar.xz
Codechange: Move join information into a single structure
Diffstat (limited to 'src/network/network_client.h')
-rw-r--r--src/network/network_client.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/network/network_client.h b/src/network/network_client.h
index 40b8eedf9..28d2d0021 100644
--- a/src/network/network_client.h
+++ b/src/network/network_client.h
@@ -112,9 +112,14 @@ typedef ClientNetworkGameSocketHandler MyClient;
void NetworkClient_Connected();
void NetworkClientSetCompanyPassword(const char *password);
-extern CompanyID _network_join_as;
+/** Information required to join a server. */
+struct NetworkJoinInfo {
+ NetworkJoinInfo() : company(COMPANY_SPECTATOR), server_password(nullptr), company_password(nullptr) {}
+ CompanyID company; ///< The company to join.
+ const char *server_password; ///< The password of the server to join.
+ const char *company_password; ///< The password of the company to join.
+};
-extern const char *_network_join_server_password;
-extern const char *_network_join_company_password;
+extern NetworkJoinInfo _network_join;
#endif /* NETWORK_CLIENT_H */