mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
* 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:
@@ -42,6 +42,7 @@ public:
|
||||
void handle(const RakNet::RakNetGUID&, UpdateBlockPacket*) override;
|
||||
void handle(const RakNet::RakNetGUID&, ChunkDataPacket*) override;
|
||||
void handle(const RakNet::RakNetGUID&, PlayerEquipmentPacket*) override;
|
||||
void handle(const RakNet::RakNetGUID&, LevelDataPacket*) override;
|
||||
|
||||
bool areAllChunksLoaded();
|
||||
void requestNextChunk();
|
||||
@@ -56,6 +57,7 @@ private:
|
||||
RakNet::RakNetGUID m_serverGUID;
|
||||
int m_field_24;
|
||||
std::vector<SBufferedBlockUpdate> m_bufferedBlockUpdates;
|
||||
int m_chunksRequested = 0;
|
||||
int m_chunksRequested;
|
||||
int m_serverProtocolVersion;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user