Fixed map loading with protocol 0.76.

This commit is contained in:
Tuupertunut 2019-09-22 21:15:43 +03:00
parent ffb3f33abe
commit 3539b4240c

View File

@ -88,6 +88,7 @@ namespace spades {
PacketTypeWeaponReload = 28, // C2S2P
PacketTypeChangeTeam = 29, // C2S2P
PacketTypeChangeWeapon = 30, // C2S2P
PacketTypeMapCached = 31, // S2C
PacketTypeHandShakeInit = 31, // S2C
PacketTypeHandShakeReturn = 32, // C2S
PacketTypeVersionGet = 33, // S2C
@ -1299,6 +1300,11 @@ namespace spades {
} break;
case PacketTypeMapStart: {
// next map!
if (protocolVersion == 4) {
NetPacketWriter wri(PacketTypeMapCached);
wri.Write((uint8_t)0);
enet_peer_send(peer, 0, wri.CreatePacket());
}
client->SetWorld(NULL);
auto mapSize = reader.ReadInt();