Codechange: [Network] Use a single NetworkServerGameInfo object at server side and serialize that for the clients

This commit is contained in:
rubidium42
2021-05-05 19:15:37 +02:00
committed by rubidium42
parent 24e7cb4947
commit 72bd62fd70
5 changed files with 42 additions and 48 deletions

View File

@@ -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);