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

@@ -170,11 +170,8 @@ void ServerNetworkUDPSocketHandler::Receive_CLIENT_FIND_SERVER(Packet *p, Networ
return;
}
NetworkGameInfo ngi;
FillNetworkGameInfo(ngi);
Packet packet(PACKET_UDP_SERVER_RESPONSE);
SerializeNetworkGameInfo(&packet, &ngi);
SerializeNetworkGameInfo(&packet, GetCurrentNetworkServerGameInfo());
/* Let the client know that we are here */
this->SendPacket(&packet, client_addr);