Codechange: use NetworkAddress instead of two host/port variables where possible
This also means we no longer need last_host/last_port, but can just use a single last_joined setting.
This commit is contained in:

committed by
Patric Stout

parent
99f998805b
commit
be37a2cab8
@@ -18,6 +18,7 @@
|
||||
// #define DEBUG_FAILED_DUMP_COMMANDS
|
||||
|
||||
#include "network_type.h"
|
||||
#include "core/address.h"
|
||||
#include "../console_type.h"
|
||||
#include "../gfx_type.h"
|
||||
#include "../openttd.h"
|
||||
@@ -45,14 +46,15 @@ void NetworkReboot();
|
||||
void NetworkDisconnect(bool blocking = false, bool close_admins = true);
|
||||
void NetworkGameLoop();
|
||||
void NetworkBackgroundLoop();
|
||||
void ParseConnectionString(const char **port, char *connection_string);
|
||||
void ParseGameConnectionString(const char **company, const char **port, char *connection_string);
|
||||
void NetworkStartDebugLog(const char *hostname, uint16 port);
|
||||
void ParseFullConnectionString(const char **company, const char **port, char *connection_string);
|
||||
NetworkAddress ParseConnectionString(const char *connection_string, int default_port);
|
||||
NetworkAddress ParseGameConnectionString(CompanyID *company, const char *connection_string, int default_port);
|
||||
void NetworkStartDebugLog(NetworkAddress &address);
|
||||
void NetworkPopulateCompanyStats(NetworkCompanyStats *stats);
|
||||
|
||||
void NetworkUpdateClientInfo(ClientID client_id);
|
||||
void NetworkClientsToSpectators(CompanyID cid);
|
||||
void NetworkClientConnectGame(const char *hostname, uint16 port, CompanyID join_as, const char *join_server_password = nullptr, const char *join_company_password = nullptr);
|
||||
void NetworkClientConnectGame(NetworkAddress &address, CompanyID join_as, const char *join_server_password = nullptr, const char *join_company_password = nullptr);
|
||||
void NetworkClientRequestMove(CompanyID company, const char *pass = "");
|
||||
void NetworkClientSendRcon(const char *password, const char *command);
|
||||
void NetworkClientSendChat(NetworkAction action, DestType type, int dest, const char *msg, int64 data = 0);
|
||||
|
Reference in New Issue
Block a user