(svn r13251) -Codechange: rename _patches to _settings as that is more logic.
-Codechange: move all Settings into substructs of _settings in a way that they are logically grouped.
This commit is contained in:
@@ -1009,7 +1009,7 @@ static void NetworkInitGameInfo()
|
||||
_network_game_info.spectators_on = 0;
|
||||
|
||||
_network_game_info.game_date = _date;
|
||||
_network_game_info.start_date = ConvertYMDToDate(_patches.starting_year, 0, 1);
|
||||
_network_game_info.start_date = ConvertYMDToDate(_settings.game_creation.starting_year, 0, 1);
|
||||
_network_game_info.map_width = MapSizeX();
|
||||
_network_game_info.map_height = MapSizeY();
|
||||
_network_game_info.map_set = _opt.landscape;
|
||||
|
@@ -83,7 +83,7 @@ void HashCurrentCompanyPassword()
|
||||
{
|
||||
if (StrEmpty(_network_player_info[_local_player].password)) return;
|
||||
|
||||
_password_game_seed = _patches.generation_seed;
|
||||
_password_game_seed = _settings.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);
|
||||
|
@@ -1342,7 +1342,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) && _patches.give_money) {
|
||||
if (IsValidPlayer(_network_playas) && IsValidPlayer(ci->client_playas) && _settings.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(_patches.generation_seed);
|
||||
p->Send_uint32(_settings.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(_patches.generation_seed);
|
||||
p->Send_uint32(_settings.game_creation.generation_seed);
|
||||
p->Send_string(_network_unique_id);
|
||||
cs->Send_Packet(p);
|
||||
|
||||
|
Reference in New Issue
Block a user