diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-08-07 19:16:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-07 19:16:31 +0200 |
commit | e462a9a5ef46776d974203bb44e0b89e8c980b29 (patch) | |
tree | 4562ef5587bd896890d843877031d5818de19bbc /src/serverobject.h | |
parent | 003af7421352ec1b8ba0d230b807862e1e4cc7e9 (diff) | |
download | minetest-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/serverobject.h')
-rw-r--r-- | src/serverobject.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/serverobject.h b/src/serverobject.h index 08f7a7e58..c81abb972 100644 --- a/src/serverobject.h +++ b/src/serverobject.h @@ -170,9 +170,7 @@ public: {} // Inventory and wielded item - virtual Inventory* getInventory() - { return NULL; } - virtual const Inventory* getInventory() const + virtual Inventory *getInventory() const { return NULL; } virtual InventoryLocation getInventoryLocation() const { return InventoryLocation(); } @@ -180,7 +178,7 @@ public: {} virtual std::string getWieldList() const { return ""; } - virtual int getWieldIndex() const + virtual u16 getWieldIndex() const { return 0; } virtual ItemStack getWieldedItem() const; virtual bool setWieldedItem(const ItemStack &item); |