diff options
author | Darkvater <darkvater@openttd.org> | 2006-08-27 10:49:43 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-08-27 10:49:43 +0000 |
commit | cb4e99ddfbdb5235c8281770959e1c4f77a8f51f (patch) | |
tree | e3074560da7750c1df452cc89315adfd92e07842 /network.c | |
parent | 2f6a4bc1a92aeb4904e5e84e23fa28d0307a303c (diff) | |
download | openttd-cb4e99ddfbdb5235c8281770959e1c4f77a8f51f.tar.xz |
(svn r6170) -Feature: save max_companies/clients/spectators in the config file.
Diffstat (limited to 'network.c')
-rw-r--r-- | network.c | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1392,10 +1392,16 @@ void NetworkStartUp(void) /* Generate an unique id when there is none yet */ if (_network_unique_id[0] == '\0') NetworkGenerateUniqueId(); - memset(&_network_game_info, 0, sizeof(_network_game_info)); - _network_game_info.clients_max = 10; // XXX - hardcoded, string limiation -- TrueLight - _network_game_info.companies_max = MAX_PLAYERS; // 8 - _network_game_info.spectators_max = _network_game_info.clients_max; + { + byte cl_max = _network_game_info.clients_max; + byte cp_max = _network_game_info.companies_max; + byte sp_max = _network_game_info.spectators_max; + + memset(&_network_game_info, 0, sizeof(_network_game_info)); + _network_game_info.clients_max = cl_max; + _network_game_info.companies_max = cp_max; + _network_game_info.spectators_max = sp_max; + } // Let's load the network in windows #if defined(WIN32) |