(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.
This commit is contained in:
@@ -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');
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -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);
|
||||
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user