diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-01 14:21:33 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-01 18:30:08 +0200 |
commit | 83985fe26f1ad87df709f122f74e5d50485095fa (patch) | |
tree | 9394e4f04a96f49b8d70dae117810e737cc1d323 /src/network/network_client.h | |
parent | 39c51c35f4566553ec3c6c273c2642d796070521 (diff) | |
download | openttd-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.h | 11 |
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 */ |