]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/client/client.h
Optimize usage of TOSERVER_GOTBLOCKS packet
[dragonfireclient.git] / src / client / client.h
index ef700e477c03bbc482af082df511634cd8a20cf7..527ae652415551045e74c9b1a334ed985d6b6aa1 100644 (file)
@@ -243,7 +243,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        void clearOutChatQueue();
        void sendChangePassword(const std::string &oldpassword,
                const std::string &newpassword);
-       void sendDamage(u8 damage);
+       void sendDamage(u16 damage);
        void sendRespawn();
        void sendReady();
 
@@ -342,7 +342,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        bool mediaReceived()
        { return !m_media_downloader; }
 
-       u8 getProtoVersion()
+       u16 getProtoVersion()
        { return m_proto_ver; }
 
        bool connectedToServer();
@@ -465,7 +465,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        void promptConfirmRegistration(AuthMechanism chosen_auth_mechanism);
        void startAuth(AuthMechanism chosen_auth_mechanism);
        void sendDeletedBlocks(std::vector<v3s16> &blocks);
-       void sendGotBlocks(v3s16 block);
+       void sendGotBlocks(const std::vector<v3s16> &blocks);
        void sendRemovedSounds(std::vector<s32> &soundList);
 
        // Helper function
@@ -504,7 +504,7 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        // and aren't accurate. We simply just don't know, because
        // the server didn't send the version back then.
        // If 0, server init hasn't been received yet.
-       u8 m_proto_ver = 0;
+       u16 m_proto_ver = 0;
 
        u16 m_playeritem = 0;
        bool m_inventory_updated = false;
@@ -565,9 +565,6 @@ class Client : public con::PeerHandler, public InventoryManager, public IGameDef
        // And relations to objects
        std::unordered_map<int, u16> m_sounds_to_objects;
 
-       // CSM/client IDs to SSM/server IDs Mapping
-       // Map server particle spawner IDs to client IDs
-       std::unordered_map<u32, u32> m_particles_server_to_client;
        // Map server hud ids to client hud ids
        std::unordered_map<u32, u32> m_hud_server_to_client;