summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-05-29 15:13:28 +0000
committerrubidium <rubidium@openttd.org>2008-05-29 15:13:28 +0000
commit923e21129c94c36bb403e955a1f334ef34722e8b (patch)
tree59059f0a1aba0794fa770e8c9a19312e4ce300af /src/network
parent2a816fb685b373e38347f809bcdc7f2fdef0139c (diff)
downloadopenttd-923e21129c94c36bb403e955a1f334ef34722e8b.tar.xz
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network.cpp4
-rw-r--r--src/network/network_client.cpp2
-rw-r--r--src/network/network_gui.cpp2
-rw-r--r--src/network/network_server.cpp4
-rw-r--r--src/network/network_udp.cpp2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/network/network.cpp b/src/network/network.cpp
index 47c3545da..959e1d66d 100644
--- a/src/network/network.cpp
+++ b/src/network/network.cpp
@@ -1009,10 +1009,10 @@ static void NetworkInitGameInfo()
_network_game_info.spectators_on = 0;
_network_game_info.game_date = _date;
- _network_game_info.start_date = ConvertYMDToDate(_settings.game_creation.starting_year, 0, 1);
+ _network_game_info.start_date = ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1);
_network_game_info.map_width = MapSizeX();
_network_game_info.map_height = MapSizeY();
- _network_game_info.map_set = _settings.game_creation.landscape;
+ _network_game_info.map_set = _settings_game.game_creation.landscape;
_network_game_info.use_password = (_network_server_password[0] != '\0');
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index d76c98511..517a191e3 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -83,7 +83,7 @@ void HashCurrentCompanyPassword()
{
if (StrEmpty(_network_player_info[_local_player].password)) return;
- _password_game_seed = _settings.game_creation.generation_seed;
+ _password_game_seed = _settings_game.game_creation.generation_seed;
ttd_strlcpy(_password_server_unique_id, _network_unique_id, sizeof(_password_server_unique_id));
const char *new_pw = GenerateCompanyPasswordHash(_network_player_info[_local_player].password);
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 5661b2f03..5f3177182 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -1334,7 +1334,7 @@ struct NetworkClientListPopupWindow : Window {
if (_network_own_client_index != ci->client_index) {
/* We are no spectator and the player we want to give money to is no spectator and money gifts are allowed */
- if (IsValidPlayer(_network_playas) && IsValidPlayer(ci->client_playas) && _settings.economy.give_money) {
+ if (IsValidPlayer(_network_playas) && IsValidPlayer(ci->client_playas) && _settings_game.economy.give_money) {
GetString(this->action[i], STR_NETWORK_CLIENTLIST_GIVE_MONEY, lastof(this->action[i]));
this->proc[i++] = &ClientList_GiveMoney;
}
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index c3dcd69d1..6d0f26ff5 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -229,7 +229,7 @@ DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_NEED_PASSWORD)(NetworkTCPSocketHandl
Packet *p = NetworkSend_Init(PACKET_SERVER_NEED_PASSWORD);
p->Send_uint8(type);
- p->Send_uint32(_settings.game_creation.generation_seed);
+ p->Send_uint32(_settings_game.game_creation.generation_seed);
p->Send_string(_network_unique_id);
cs->Send_Packet(p);
}
@@ -254,7 +254,7 @@ DEF_SERVER_SEND_COMMAND(PACKET_SERVER_WELCOME)
p = NetworkSend_Init(PACKET_SERVER_WELCOME);
p->Send_uint16(cs->index);
- p->Send_uint32(_settings.game_creation.generation_seed);
+ p->Send_uint32(_settings_game.game_creation.generation_seed);
p->Send_string(_network_unique_id);
cs->Send_Packet(p);
diff --git a/src/network/network_udp.cpp b/src/network/network_udp.cpp
index 8744875d9..d6f0ec092 100644
--- a/src/network/network_udp.cpp
+++ b/src/network/network_udp.cpp
@@ -77,7 +77,7 @@ DEF_UDP_RECEIVE_COMMAND(Server, PACKET_UDP_CLIENT_FIND_SERVER)
_network_game_info.game_date = _date;
_network_game_info.map_width = MapSizeX();
_network_game_info.map_height = MapSizeY();
- _network_game_info.map_set = _settings.game_creation.landscape;
+ _network_game_info.map_set = _settings_game.game_creation.landscape;
_network_game_info.companies_on = ActivePlayerCount();
_network_game_info.spectators_on = NetworkSpectatorCount();
_network_game_info.grfconfig = _grfconfig;