MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / FillStaticNetworkServerGameInfo

Function FillStaticNetworkServerGameInfo

src/network/core/network_game_info.cpp:142–156  ·  view source on GitHub ↗

* Fill a NetworkServerGameInfo structure with the static content, or things * that are so static they can be updated on request from a settings change. */

Source from the content-addressed store, hash-verified

140 * that are so static they can be updated on request from a settings change.
141 */
142void FillStaticNetworkServerGameInfo()
143{
144 _network_game_info.use_password = !_settings_client.network.server_password.empty();
145 _network_game_info.calendar_start = TimerGameCalendar::ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1);
146 _network_game_info.clients_max = _settings_client.network.max_clients;
147 _network_game_info.companies_max = _settings_client.network.max_companies;
148 _network_game_info.map_width = Map::SizeX();
149 _network_game_info.map_height = Map::SizeY();
150 _network_game_info.landscape = _settings_game.game_creation.landscape;
151 _network_game_info.dedicated = _network_dedicated;
152 CopyGRFConfigList(_network_game_info.grfconfig, _grfconfig, false);
153
154 _network_game_info.server_name = _settings_client.network.server_name;
155 _network_game_info.server_revision = GetNetworkRevisionString();
156}
157
158/**
159 * Get the NetworkServerGameInfo structure with the latest information of the server.

Callers 2

NetworkInitGameInfoFunction · 0.85

Calls 3

CopyGRFConfigListFunction · 0.85
GetNetworkRevisionStringFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected