Explain why we send MapCached

This commit is contained in:
Tomoaki Kawada 2020-08-06 15:19:16 +09:00 committed by GitHub
parent 3539b4240c
commit 5a57a5e406
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1301,6 +1301,11 @@ namespace spades {
case PacketTypeMapStart: {
// next map!
if (protocolVersion == 4) {
// The AoS 0.76 protocol allows the client to load a map from a local cache
// if possible. After receiving MapStart, the client should respond with
// MapCached to indicate whether the map with a given checksum exists in the
// cache or not. We don't implement a local cache, so we always ask the
// server to send fresh map data.
NetPacketWriter wri(PacketTypeMapCached);
wri.Write((uint8_t)0);
enet_peer_send(peer, 0, wri.CreatePacket());