This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(0, 'jf') | |
(1, 'kx') | |
readInt | |
readUTF | |
readUTF | |
readLong | |
readByte | |
(2, 'ju') | |
readUTF | |
(3, 'lu') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Compress the packed byte_array to *compressed, set compressed_length | |
bool Chunk::zip() | |
{ | |
//Delete old zip | |
if (zipped != NULL) { delete zipped; } | |
//Allocate more space for compressed than uncompressed, for header bytes | |
zipped_length = compressBound(byte_length); | |
zipped = new Bytef[ zipped_length ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Update player inventory | |
size_t mcmm_client::getInventory(netpacket *pkt ) | |
{ | |
int32_t inv_type; | |
int16_t inv_count; | |
//Total length = 7 bytes + (4 shorts + health OR 36 shorts + health) | |
size_t packetsize = pkt->get_maxsize(); | |
size_t minimumsize = SIZE_INVENTORY; | |