summaryrefslogtreecommitdiff
path: root/src/client/client.h
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-08-07 19:16:31 +0200
committerGitHub <noreply@github.com>2019-08-07 19:16:31 +0200
commite462a9a5ef46776d974203bb44e0b89e8c980b29 (patch)
tree4562ef5587bd896890d843877031d5818de19bbc /src/client/client.h
parent003af7421352ec1b8ba0d230b807862e1e4cc7e9 (diff)
downloadminetest-e462a9a5ef46776d974203bb44e0b89e8c980b29.tar.gz
minetest-e462a9a5ef46776d974203bb44e0b89e8c980b29.tar.bz2
minetest-e462a9a5ef46776d974203bb44e0b89e8c980b29.zip
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
Diffstat (limited to 'src/client/client.h')
-rw-r--r--src/client/client.h10
1 files changed, 3 insertions, 7 deletions
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<std::string> &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;