From e462a9a5ef46776d974203bb44e0b89e8c980b29 Mon Sep 17 00:00:00 2001 From: SmallJoker Date: Wed, 7 Aug 2019 19:16:31 +0200 Subject: Unify wield item handling (#8677) This moves the wield item functions to Player and the tool utils for range calculation Also 'local_inventory' was removed due to redundancy in Client --- src/client/client.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/client/client.h') diff --git a/src/client/client.h b/src/client/client.h index 527ae6524..8ee34a4bd 100644 --- a/src/client/client.h +++ b/src/client/client.h @@ -271,10 +271,6 @@ public: void setPlayerControl(PlayerControl &control); - void selectPlayerItem(u16 item); - u16 getPlayerItem() const - { return m_playeritem; } - // Returns true if the inventory of the local player has been // updated from the server. If it is true, it is set to false. bool getLocalInventoryUpdated(); @@ -285,6 +281,9 @@ public: Inventory* getInventory(const InventoryLocation &loc) override; void inventoryAction(InventoryAction *a) override; + // Send the item number 'item' as player item to the server + void setPlayerItem(u16 item); + const std::list &getConnectedPlayerNames() { return m_env.getPlayerNames(); @@ -454,8 +453,6 @@ private: void Receive(); void sendPlayerPos(); - // Send the item number 'item' as player item to the server - void sendPlayerItem(u16 item); void deleteAuthData(); // helper method shared with clientpackethandler @@ -506,7 +503,6 @@ private: // If 0, server init hasn't been received yet. u16 m_proto_ver = 0; - u16 m_playeritem = 0; bool m_inventory_updated = false; Inventory *m_inventory_from_server = nullptr; float m_inventory_from_server_age = 0.0f; -- cgit v1.2.3