diff options
author | rubidium <rubidium@openttd.org> | 2009-05-19 21:20:14 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-05-19 21:20:14 +0000 |
commit | 9f4d64bda06a449e2b1c528e342be5bb12a1623b (patch) | |
tree | c7ae21e8a883df20254134a0e155ef468c61fef8 /src/network/network.cpp | |
parent | 00bc2659f24b07851291d56d170174ed27581bc7 (diff) | |
download | openttd-9f4d64bda06a449e2b1c528e342be5bb12a1623b.tar.xz |
(svn r16360) -Codechange: don't use _network_playas as a 'second' _local_company, but only as a storage location for the company you want to join in MP.
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r-- | src/network/network.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp index f2d5e497a..4d407e2b0 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp @@ -714,7 +714,7 @@ public: /* Used by clients, to connect to a server */ -void NetworkClientConnectGame(NetworkAddress address) +void NetworkClientConnectGame(NetworkAddress address, CompanyID join_as) { if (!_network_available) return; @@ -722,6 +722,7 @@ void NetworkClientConnectGame(NetworkAddress address) strecpy(_settings_client.network.last_host, address.GetHostname(), lastof(_settings_client.network.last_host)); _settings_client.network.last_port = address.GetPort(); + _network_join_as = join_as; NetworkDisconnect(); NetworkInitialize(); @@ -778,9 +779,6 @@ bool NetworkServerStart() _last_sync_frame = 0; _network_own_client_id = CLIENT_ID_SERVER; - /* Non-dedicated server will always be company #1 */ - if (!_network_dedicated) _network_playas = COMPANY_FIRST; - _network_clients_connected = 0; NetworkInitGameInfo(); @@ -1126,6 +1124,3 @@ bool IsNetworkCompatibleVersion(const char *other) } #endif /* ENABLE_NETWORK */ - -/* NOTE: this variable needs to be always available */ -CompanyID _network_playas; |