Zstd: Use zstd for network joins if supported at both ends

See also: https://github.com/OpenTTD/OpenTTD/pull/8773
This commit is contained in:
Jonathan G Rennison
2021-03-01 18:22:21 +00:00
parent 922e8554de
commit c2ae7580e0
5 changed files with 55 additions and 31 deletions

View File

@@ -482,6 +482,11 @@ NetworkRecvStatus ClientNetworkGameSocketHandler::SendGetMap()
my_client->status = STATUS_MAP_WAIT;
Packet *p = new Packet(PACKET_CLIENT_GETMAP);
#if defined(WITH_ZSTD)
p->Send_bool(true);
#else
p->Send_bool(false);
#endif
my_client->SendPacket(p);
return NETWORK_RECV_STATUS_OKAY;
}