1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Move client packet generators to dedicated functions for:

* TOSERVER_INIT_LEGACY
* TOSERVER_DELETEDBLOCKS
* TOSERVER_GOTBLOCKS
* TOSERVER_REMOVED_SOUNDS
Also use a std::vector instead of std::set for TOSERVER_REMOVED_SOUNDS
This commit is contained in:
Loic Blot 2015-03-16 12:39:27 +01:00
parent e7736ffdd6
commit d63df4ecb1
2 changed files with 64 additions and 38 deletions

View file

@ -542,6 +542,11 @@ private:
// Send the item number 'item' as player item to the server
void sendPlayerItem(u16 item);
void sendLegacyInit(const char* playerName, const char* playerPassword);
void sendDeletedBlocks(std::vector<v3s16> &blocks);
void sendGotBlocks(v3s16 block);
void sendRemovedSounds(std::vector<s32> &soundList);
float m_packetcounter_timer;
float m_connection_reinit_timer;
float m_avg_rtt_timer;