summaryrefslogtreecommitdiff
path: root/src/settings.cpp
diff options
context:
space:
mode:
authorrubidium42 <rubidium@openttd.org>2021-05-05 19:21:12 +0200
committerrubidium42 <rubidium42@users.noreply.github.com>2021-05-05 21:01:23 +0200
commite7581fd42d9740ca68adfc2ec55edb49d51af237 (patch)
tree51c7a9c14c282e2105e3bf3d298528488eb896e4 /src/settings.cpp
parent72bd62fd705c495d90f08adc964ff8d7f84c6cc1 (diff)
downloadopenttd-e7581fd42d9740ca68adfc2ec55edb49d51af237.tar.xz
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.
Diffstat (limited to 'src/settings.cpp')
-rw-r--r--src/settings.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/settings.cpp b/src/settings.cpp
index c5819297f..c0b0dd8ed 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -1416,6 +1416,7 @@ static bool UpdateServerPassword(int32 p1)
_settings_client.network.server_password[0] = '\0';
}
+ NetworkServerUpdateGameInfo();
return true;
}
@@ -1430,6 +1431,7 @@ static bool UpdateRconPassword(int32 p1)
static bool UpdateClientConfigValues(int32 p1)
{
+ NetworkServerUpdateGameInfo();
if (_network_server) NetworkServerSendConfigUpdate();
return true;