Change: [Network] Update server's NetworkServerGameInfo only when needed

Split the updating in a "static" version that only needs to be called when a new map is loaded or some settings are changed, and a "dynamic" version that updates everything that changes regularly such as the current game date or the number of spectators.
This commit is contained in:
rubidium42
2021-05-05 19:21:12 +02:00
committed by rubidium42
parent 72bd62fd70
commit e7581fd42d
8 changed files with 42 additions and 13 deletions

View File

@@ -805,6 +805,7 @@ static void NetworkInitGameInfo()
strecpy(_settings_client.network.server_name, "Unnamed Server", lastof(_settings_client.network.server_name));
}
FillStaticNetworkServerGameInfo();
/* The server is a client too */
_network_game_info.clients_on = _network_dedicated ? 0 : 1;