* Improve the level sending mechanism in the game.

Instead of sending a request for each chunk one by one, and in sequence, send all the level data in one block.

I know this is not the best solution since we are working with UDP here, but it's way faster than loading the level chunk by chunk. In a blink of an eye, the level has already loaded.
This commit is contained in:
iProgramInCpp
2023-08-12 23:14:13 +03:00
parent 944eb3ace4
commit 498fe048cd
12 changed files with 246 additions and 10 deletions

View File

@@ -567,6 +567,7 @@ bool DeleteDirectory(const std::string& name, bool unused);
// compress and decompress stuff with zlib: ( you must SAFE_DELETE_ARRAY what it returns )
uint8_t* ZlibInflateToMemory(uint8_t* pInput, size_t compressedSize, size_t decompressedSize);
uint8_t* ZlibDeflateToMemory(uint8_t* pInput, size_t sizeBytes, size_t *compressedSizeOut);
uint8_t* ZlibDeflateToMemoryLvl(uint8_t* pInput, size_t sizeBytes, size_t* compressedSizeOut, int level);
// things that we added:
#ifndef ORIGINAL_CODE