diff options
author | rubidium42 <rubidium@openttd.org> | 2021-05-05 19:15:37 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-05-05 21:01:23 +0200 |
commit | 72bd62fd705c495d90f08adc964ff8d7f84c6cc1 (patch) | |
tree | 300f3f5066f48624e1f56dc5418d68612c690bf9 /src/network/network_server.cpp | |
parent | 24e7cb494738a8e0117dbd8c4a148a9ee532e129 (diff) | |
download | openttd-72bd62fd705c495d90f08adc964ff8d7f84c6cc1.tar.xz |
Codechange: [Network] Use a single NetworkServerGameInfo object at server side and serialize that for the clients
Diffstat (limited to 'src/network/network_server.cpp')
-rw-r--r-- | src/network/network_server.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp index fd69a8d37..905290bfc 100644 --- a/src/network/network_server.cpp +++ b/src/network/network_server.cpp @@ -356,11 +356,8 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendClientInfo(NetworkClientIn /** Send the client information about the server. */ NetworkRecvStatus ServerNetworkGameSocketHandler::SendGameInfo() { - NetworkGameInfo ngi; - FillNetworkGameInfo(ngi); - Packet *p = new Packet(PACKET_SERVER_GAME_INFO); - SerializeNetworkGameInfo(p, &ngi); + SerializeNetworkGameInfo(p, GetCurrentNetworkServerGameInfo()); this->SendPacket(p); |