Codechange: add accessor for the packet type to Packet and make the internal state of Packet private

This commit is contained in:
Rubidium
2021-04-21 07:10:09 +02:00
committed by rubidium42
parent 3abefdf561
commit 450178d780
3 changed files with 13 additions and 3 deletions

View File

@@ -626,7 +626,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::SendMap()
for (uint i = 0; (has_packets = this->savegame->HasPackets()) && i < sent_packets; i++) {
Packet *p = this->savegame->PopPacket();
last_packet = p->buffer[2] == PACKET_SERVER_MAP_DONE;
last_packet = p->GetPacketType() == PACKET_SERVER_MAP_DONE;
this->SendPacket(p);